Page 1 of 1
two way panel
Posted: Wed Oct 18, 2017 1:47 pm
by startz
(This may not be the most clever question ever.)
I would like to create a two-way panel so I can use two sets of fixed effects. Think of one id being a student grade and the other being a department. The two together do not give a unique identifier, since a student may take multiple courses in one department.
When I restructure, I get a three dimensional panel to get a unique id. But then I don't get the option to use fixed effects.
What am I missing?
Re: two way panel
Posted: Wed Oct 18, 2017 3:58 pm
by EViews Gareth
We don't offer fixed effects for 3D panels. Only two dimensions (even if one of them isn't time).
Re: two way panel
Posted: Wed Oct 18, 2017 5:40 pm
by startz
We don't offer fixed effects for 3D panels. Only two dimensions (even if one of them isn't time).
That's kind of what I thought. The issue is that sometimes one wants to do fixed effects and there's no way to do that without creating a panel.
Re: two way panel
Posted: Wed Oct 18, 2017 5:54 pm
by EViews Gareth
Dummies?
Re: two way panel
Posted: Wed Oct 18, 2017 6:00 pm
by startz
One dimension has about 100 categories. That'll work. The other has 20,000. I need something to sweep out the dummies.
Re: two way panel
Posted: Fri Oct 20, 2017 1:28 pm
by EViews Glenn
If you have three variables, say Y, X1, and X2, you can easily demean using
Code: Select all
frml ydm = y - @meansby(y, id)
frml x1dm = x - @meansby(x1, id)
frml x2dm = x - @meansby(x2, id)
where ID is the categorization variable corresponding to the 10,000 dummies. The result will be the series with means-by-category removed.
Re: two way panel
Posted: Fri Oct 20, 2017 1:30 pm
by startz
If you have three variables, say Y, X1, and X2, you can easily demean using
Code: Select all
frml ydm = y - @meansby(y, id)
frml x1dm = x - @meansby(x1, id)
frml x2dm = x - @meansby(x2, id)
where ID is the categorization variable corresponding to the 10,000 dummies. The result will be the series with means-by-category removed.
Yes, but one of the other variables is an @expand with about 50 categories. So 50 dummies would have to be generated and demeaned. Is there an easy way to do that?
Re: two way panel
Posted: Fri Oct 20, 2017 3:37 pm
by EViews Glenn
The @expand should work for the remaining dimension, no?
Re: two way panel
Posted: Fri Oct 20, 2017 3:40 pm
by startz
The @expand dummies would need to be treated by the @meansby demeaning, no?
Re: two way panel
Posted: Mon Oct 23, 2017 10:58 am
by EViews Glenn
True. I forget that you are unbalanced.