two way panel

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

two way panel

Postby startz » Wed Oct 18, 2017 1:47 pm

(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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: two way panel

Postby EViews Gareth » Wed Oct 18, 2017 3:58 pm

We don't offer fixed effects for 3D panels. Only two dimensions (even if one of them isn't time).
Follow us on Twitter @IHSEViews

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: two way panel

Postby startz » Wed Oct 18, 2017 5:40 pm

EViews Gareth wrote: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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: two way panel

Postby EViews Gareth » Wed Oct 18, 2017 5:54 pm

Dummies?
Follow us on Twitter @IHSEViews

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: two way panel

Postby startz » Wed Oct 18, 2017 6:00 pm

One dimension has about 100 categories. That'll work. The other has 20,000. I need something to sweep out the dummies.

EViews Glenn
EViews Developer
Posts: 2671
Joined: Wed Oct 15, 2008 9:17 am

Re: two way panel

Postby EViews Glenn » Fri Oct 20, 2017 1:28 pm

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.

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: two way panel

Postby startz » Fri Oct 20, 2017 1:30 pm

EViews Glenn wrote: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?

EViews Glenn
EViews Developer
Posts: 2671
Joined: Wed Oct 15, 2008 9:17 am

Re: two way panel

Postby EViews Glenn » Fri Oct 20, 2017 3:37 pm

The @expand should work for the remaining dimension, no?

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: two way panel

Postby startz » Fri Oct 20, 2017 3:40 pm

The @expand dummies would need to be treated by the @meansby demeaning, no?

EViews Glenn
EViews Developer
Posts: 2671
Joined: Wed Oct 15, 2008 9:17 am

Re: two way panel

Postby EViews Glenn » Mon Oct 23, 2017 10:58 am

True. I forget that you are unbalanced.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 13 guests