Panel Data
Moderators: EViews Gareth, EViews Moderator
Panel Data
Hi,
I would appreciate some input on how best to deal with panel data.
I have in total about 100 indices (60 quarters each) which I import into Eviews from excel. I then stack the data into a different sheet and the indices are identified by a small text string.
The reason for my work is to see the relative movement of the indices compared to the main index. I therefore would like to create dummys for each index first and then estimate dlog(Panel)= C +dlog(mainindex) + dlog(mainindex)*dummys
What would be the easyiest way to first create the dummys and then estimate various permutations?
Many thanks
Mark
I would appreciate some input on how best to deal with panel data.
I have in total about 100 indices (60 quarters each) which I import into Eviews from excel. I then stack the data into a different sheet and the indices are identified by a small text string.
The reason for my work is to see the relative movement of the indices compared to the main index. I therefore would like to create dummys for each index first and then estimate dlog(Panel)= C +dlog(mainindex) + dlog(mainindex)*dummys
What would be the easyiest way to first create the dummys and then estimate various permutations?
Many thanks
Mark
Re: Panel Data
I have been playing around with the FOR LOOP function but can't get it to work.
My cross sections are identified in a var01 string series. Essentially I need to run:
series 1, 2, 3...x = @recode(var01="1,2,3,.....x", 1, 0)
to create dummy series for each cross section. Gareth could you give some pointers please?
My cross sections are identified in a var01 string series. Essentially I need to run:
series 1, 2, 3...x = @recode(var01="1,2,3,.....x", 1, 0)
to create dummy series for each cross section. Gareth could you give some pointers please?
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Panel Data
Probably best off using a pool, which can estimate with cross-section specific regressors.
Follow us on Twitter @IHSEViews
Re: Panel Data
Thanks Gareth
The panel structure works fine, I have done it on a smaller scale. I just don't want to have to manually run the @RECODE command to make each dummy. I have to run several other sized panel in the same way.
Surely FOR LOOP can be used in someway?
The panel structure works fine, I have done it on a smaller scale. I just don't want to have to manually run the @RECODE command to make each dummy. I have to run several other sized panel in the same way.
Surely FOR LOOP can be used in someway?
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Panel Data
Thanks but I'm not sure how to use a group for what I need.
Could you please just briefly run through how the loop function works with string series identifiers? I am sure this is very efficient once you know how to use but there is not much guidance apart from the few threads you have written on here. There is very little on youtube etc compared to stata SAS R etc.
Thanks
Mark
Could you please just briefly run through how the loop function works with string series identifiers? I am sure this is very efficient once you know how to use but there is not much guidance apart from the few threads you have written on here. There is very little on youtube etc compared to stata SAS R etc.
Thanks
Mark
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Panel Data
Follow us on Twitter @IHSEViews
Re: Panel Data
Thanks Gareth
I have looked at this before.
This is what I have tried instead of @recode, which gives the error "Syntax error in "If VAR01="{%x}"" I can't seem to sample the individual cross sections to change the dummy to 1. Any suggestions would be greatly received!
I have looked at this before.
This is what I have tried instead of @recode, which gives the error "Syntax error in "If VAR01="{%x}"" I can't seem to sample the individual cross sections to change the dummy to 1. Any suggestions would be greatly received!
Code: Select all
for %x OFFICE INDUSTRIAL RETAIL
series D_{%x} = 0
if var01="{%x}"
smpl @all
endif
series D_{%x} = 1
smpl @all
next
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Panel Data
Nope still "Syntax error in "if var01="OFFICE""
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Panel Data
Well spotted. The code runs now but just has all obs = 1 so I am not sure if the if statement is sampling correctly.
EDIT: Working fine now, thanks again.
EDIT: Working fine now, thanks again.
Return to “General Information and Tips and Tricks”
Who is online
Users browsing this forum: No registered users and 17 guests