Hi,
I am trying to create a panel data set, and I want to assign names to the regions for which I have data. My code looks something like this:
wfcreate(wf=annual) a 1981 2015 10
alpha region
if crossid=1 then
region=region_name
endif
However, this doesn't work to assign names to the region variable, as I would like, and I don't understand why. What's strange is that if I create some other series, say q, assign it some arbitrary value, and use it in lieu of 'region', then the code works fine. However, that does not work if, rather than assigning it an arbitrary value, I set it equal to crossid.
Thanks,
Marc
Using 'crossid' to name "panel units" (region)
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Using 'crossid' to name "panel units" (region)
Code: Select all
wfcreate(wf=annual) a 1981 2015 10
alpha region
smpl if crossid=1 then
region="region_name"
endif
Re: Using 'crossid' to name "panel units" (region)
Thanks Gareth. Sorry if I'm missing something, but when I try that I get the error message "endif found outside of loop or IF statement".
Re: Using 'crossid' to name "panel units" (region)
Nvm. Thanks, again.
FYI (for anyone else reading this), the code that works is
wfcreate(wf=annual) a 1981 2015 10
alpha region
smpl if crossid=1
region="region_name"
FYI (for anyone else reading this), the code that works is
wfcreate(wf=annual) a 1981 2015 10
alpha region
smpl if crossid=1
region="region_name"
Who is online
Users browsing this forum: No registered users and 2 guests
