hello,
I want to create a dummy variable for panel estimation. a dummy for the legal origin of the cross sections which are either french or english legal origin.
1- what are the steps to create dummy variable?
2- should I use one dummy variable or two for each category?
3- in case of one or two dummies; the coding of the dummy variable 1 and 0 or 1 for french and 2 for english for example?
dummy variable for panel data
Moderators: EViews Gareth, EViews Moderator
-
EViews Esther
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: dummy variable for panel data
Code: Select all
smpl @all
series dum=0
smpl if legal="French"
dum=1
smpl if legal="English"
dum=2
smpl @all
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3796
- Joined: Wed Sep 17, 2008 2:25 pm
Re: dummy variable for panel data
Uh no. This is correct EViews code, but it's not a dummy variable. A dummy variable must be coded 0/1. You probably need two of them.Code: Select all
smpl @all series dum=0 smpl if legal="French" dum=1 smpl if legal="English" dum=2 smpl @all
-
EViews Esther
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: dummy variable for panel data
Yes, I just give an example to make a dummy with (0), 1, or 2 depending on the legal origin condition.
As an example, will produce a dummy with 1 if legal = English, 0 otherwise.
As an example,
Code: Select all
series dum = 0
smpl if legal = "English"
dum = 1
Last edited by EViews Esther on Tue Sep 18, 2012 2:18 pm, edited 1 time in total.
-
lamia.donia
- Posts: 6
- Joined: Fri Sep 07, 2012 3:07 pm
Re: dummy variable for panel data
thank you,
i created two dummies one for french and one for english but i get an error message: near singular matrix??
i created two dummies one for french and one for english but i get an error message: near singular matrix??
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3796
- Joined: Wed Sep 17, 2008 2:25 pm
Re: dummy variable for panel data
Google "dummy variable trap."
-
econworker
- Posts: 39
- Joined: Thu Apr 24, 2014 3:51 am
Re: dummy variable for panel data
Dear Startz
I have a question regarding the dummy variable in panel data.
I have a panel data which I want to estimate with PMG estimation. The friequency is weekly, however I included annual dummies, something like : my data is 1998 to 2014, so its 17 years weekly data and I created 17 dummy variables that takes value of one for each year and for all the cross sections. But the strange issue is that when I include the Whole annual dummy variables (17 ìannual dummies) it doesnt make any multicolinearity with constant, however when I do the same estimation with stata it drops the dummy of 1998, would you tell what is the reason for that result in Eviews?
Thank you
I have a question regarding the dummy variable in panel data.
I have a panel data which I want to estimate with PMG estimation. The friequency is weekly, however I included annual dummies, something like : my data is 1998 to 2014, so its 17 years weekly data and I created 17 dummy variables that takes value of one for each year and for all the cross sections. But the strange issue is that when I include the Whole annual dummy variables (17 ìannual dummies) it doesnt make any multicolinearity with constant, however when I do the same estimation with stata it drops the dummy of 1998, would you tell what is the reason for that result in Eviews?
Thank you
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3796
- Joined: Wed Sep 17, 2008 2:25 pm
Re: dummy variable for panel data
No idea. You might post your EViews workfile including the equation you are estimating.
Who is online
Users browsing this forum: No registered users and 2 guests
