threedimensional panel data
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
threedimensional panel data
hey,
I'd like to estimate an OLS using threedimensional panel data: investment in country i in industry j in year t is the dependant variable, independant variables are on a threedimensional level (companies in country i industry j and year t), on a two dimesional level (GDP in country i in year t) and on a onedimensional level ( overall state of the economy in year t). I figured out how to use panel data for two dimensions (it or jt) but I don't get how I can combine them into a i,j,t dimensional format, in order to estimate a fixed effects model distinguishing between industry and country.
Thanks in advance!
I'd like to estimate an OLS using threedimensional panel data: investment in country i in industry j in year t is the dependant variable, independant variables are on a threedimensional level (companies in country i industry j and year t), on a two dimesional level (GDP in country i in year t) and on a onedimensional level ( overall state of the economy in year t). I figured out how to use panel data for two dimensions (it or jt) but I don't get how I can combine them into a i,j,t dimensional format, in order to estimate a fixed effects model distinguishing between industry and country.
Thanks in advance!

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12196
 Joined: Tue Sep 16, 2008 5:38 pm
Re: threedimensional panel data
EViews doesn't have automatic fixed effects for panels with more than 2 dimensions. However, you could always use @expand(country) and @expand(industry, @dropfirst) as regressors to make fixed effects manually.
Follow us on Twitter @IHSEViews

 Posts: 5
 Joined: Mon Nov 12, 2012 7:33 pm
Re: threedimensional panel data
A 3d panel question. Have bilateral trade data by year, by commodity (ex: Russia wheat exports to Ukraine over time, Russia wheat export to US over time, Russia rice exports to Ukraine over time, Russia rice exports to US over time, etc.) I set up a panel data set in Eviews 5.1 with reporting country, partner country and commodity as xsection identifiers and year as date identifiers. Would like to generate variables that are combinations of commodities for bilateral country pairs over time. For example, (Russia wheat exports to Ukraine in 2000) + (Russia rice exports to Ukraine in 2000). Any guidance would be appreciated. Thanks.
Re: threedimensional panel data
EViews Gareth wrote:EViews doesn't have automatic fixed effects for panels with more than 2 dimensions. However, you could always use @expand(country) and @expand(industry, @dropfirst) as regressors to make fixed effects manually.
I have a similar issue and encountered several posts stating that the fixed effects of the 3rd dimensions cannot be analyzed by eviews automatically. I understand the @expand function but I don't know how the dummies that I obtain exactly enable me to create the fixed effects manually. This is probably trivial to experienced economotricians and eviews users but unfortunately, I am only a beginner.
I would therefore very much appreciate if someone could tell me how the fixed effects can be manually computed and then used for the overall panel estimation.
Thanks a lot in advance!

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12196
 Joined: Tue Sep 16, 2008 5:38 pm
Re: threedimensional panel data
Fixed effects are just crosssection dummies.
Follow us on Twitter @IHSEViews
Re: threedimensional panel data
Thank you for your quick reply.
In other words, I just estimate the dummies for every country and every sector in my data set and add them as explanatory variables to my regression? I guess I need a dummy of every category for every time period of observation?
In other words, I just estimate the dummies for every country and every sector in my data set and add them as explanatory variables to my regression? I guess I need a dummy of every category for every time period of observation?
Re: threedimensional panel data
Hi,
I have migration data for 231x231 countries, for a number of different time periods. These countries are categorised as "country of origin" and "country of destination".
I wanted to create a group of dummy variables on countrypairs (f.e., USUK, UKUS, NZLUK, UKNZL, etc.). In other words, I'm trying to include countrypair fixed effects. For that, I've done the following:
... where country_o is the country of origin; and country_d is the country of destination. However, as soon as I run that code line, Eviews stops responding (the Eviews version I'm using is 9.5). Could assistance be provided please?
Many thanks,
A.
I have migration data for 231x231 countries, for a number of different time periods. These countries are categorised as "country of origin" and "country of destination".
I wanted to create a group of dummy variables on countrypairs (f.e., USUK, UKUS, NZLUK, UKNZL, etc.). In other words, I'm trying to include countrypair fixed effects. For that, I've done the following:
Code: Select all
group dumpair @expand(country_o,country_d,@dropfirst)
... where country_o is the country of origin; and country_d is the country of destination. However, as soon as I run that code line, Eviews stops responding (the Eviews version I'm using is 9.5). Could assistance be provided please?
Many thanks,
A.

 Nonnormality and collinearity are NOT problems!
 Posts: 3464
 Joined: Wed Sep 17, 2008 2:25 pm
Re: threedimensional panel data
You're asking for 40,000+ dummies. Even if EViews can handle that, it's going to take a very, very long time.
Re: threedimensional panel data
Exactly, I'm aware it's plenty of dummies. I wouldn't mind waiting, but it's just that Eviews stops responding and automatically closes. The computer I'm working on is quite powerful, so I don't think that should be an issue... That's why I was wondering whether there was an alternative to this (e.g., a loop) that might mitigate this problem.
Many thanks,
A.
Many thanks,
A.

 Nonnormality and collinearity are NOT problems!
 Posts: 3464
 Joined: Wed Sep 17, 2008 2:25 pm
Re: threedimensional panel data
EViews shouldn't crash, but you do have a really big problem. Just storing the necessary crossproduct matrix takes 19GB of memory for a regression, although it sounds like you are getting a crash before that stage.
Assuming you have enough data (i.e. 50,000 or so observations) and that you want to estimate a linear regression, you can use a loop doing what's called "sweeping out the dummies." It might be slow and might be a bit of a pain to program, but it should be doable.
Assuming you have enough data (i.e. 50,000 or so observations) and that you want to estimate a linear regression, you can use a loop doing what's called "sweeping out the dummies." It might be slow and might be a bit of a pain to program, but it should be doable.
Re: threedimensional panel data
Thanks Startz. Is there an easier way to include idpair dummy variables? In particular, I'm estimating a gravity model on bilateral migration flows. For that, I need to include countrypair fixed effects. My model is nonlinear, the estimation method is GMM, Poisson family, loglink.
Thanks,
A.
Thanks,
A.

 Nonnormality and collinearity are NOT problems!
 Posts: 3464
 Joined: Wed Sep 17, 2008 2:25 pm
Re: threedimensional panel data
I don't think there is an easier way in a nonlinear model, although I may have forgotten something.
Re: threedimensional panel data
Is there any way that you can look further into this please? It’s essential to our work and it will mean having to move platform for multiple users if it can’t be done in Eviews.

 Nonnormality and collinearity are NOT problems!
 Posts: 3464
 Joined: Wed Sep 17, 2008 2:25 pm
Re: threedimensional panel data
Perhaps the EViews staff has some suggestions, but I suspect this isn't really a software issue. I think you are going to find it hard to do this in any software. Also, my memory is that in a nonlinear model you will need a large number of observations per country pair in order to get consistency. That's an econometric rather than a software issue.
Re: threedimensional panel data
I'll phrase the doubt differently. I'm not specifically interested in getting the values of the countrypair dummies, but I do want them to be included in my regression (i.e., I want the coefficients to be conditional on these pairfixed effects). This is something really common when using this type of techniques, so I'm not really asking for any econometric doubt. My dataset is large enough to be able to do this in a consistent manner, and I do know another software that is capable of doing this really easily. But I want to stick to Eviews.
Who is online
Users browsing this forum: No registered users and 2 guests