Hi all,
i am currently in the process of doing a gravity model on bilateral trade using eviews. as such, i got importer and exporter countries as id and then i have resepctive series like trade, gnp per capita and population. my data is in the excel fromat but it is unbalanced. how do i strcuture it onto eviews? and wat should i write for the crossid? the data is only over 2 years, 2000 and 2001.
i have a copy of the data here.
structuring a panel workfile
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: structuring a panel workfile
Your data cannot be structured as panel data since there is no way to uniquely identify the observations. It is close to being a three way panel, with YEAR as the date series, and IMP and EXP being the two cross-section ID series. However that still leaves you with some duplicates. For example, in YEAR 2000, there are two observations with IMP=IDN and EXP=SGP.
Re: structuring a panel workfile
so how do u propose i manipulate the data such that i can input it into eviews as panel? i am really in need of help! i have been stuck for over a week now. thanks a lot for replying!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: structuring a panel workfile
Well first you need to think about whether your data is panel data or not, and if it is, you need to think about what are the cross-sections etc...
The reason EViews isn't currently accepting your data as panel data is because your data is currently not panel data.
This isn't really an EViews issue...
The reason EViews isn't currently accepting your data as panel data is because your data is currently not panel data.
This isn't really an EViews issue...
Re: structuring a panel workfile
i finally understood the problem with my data. i ahd duplication in the cells which led to duplication of the cellids. so i was unable to structure my workfile as panel workfile. i have finally managed to strucure the workfile and am currently running a bilateral trade regression. I would like to introduce a time dummy variable for the year and I only have a 2 year time frame. I created the dummy using EVIEWS but kept getting the message near singular matrix. i understand that i have fallen into the dummy variable trap. any ideas how to get out of it?
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: structuring a panel workfile
Drop one of your period dummies.
More generally, if you have a lot of periods, use the @expand command in the estimation routine. @expand will allow you to drop one of the time-period dummies automatically.
More generally, if you have a lot of periods, use the @expand command in the estimation routine. @expand will allow you to drop one of the time-period dummies automatically.
Re: structuring a panel workfile
sorry about it but how do i input @expand in the equation estimation? does it work if i have only 2 years?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: structuring a panel workfile
You could enter @expand(@year, @dropfirst), or something along those lines into your equation. However in a two-year panel, it is not really worth it.
You would be better off just entering something like if @year=1990 (or whatever your second year of data is).
You would be better off just entering something like if @year=1990 (or whatever your second year of data is).
Who is online
Users browsing this forum: No registered users and 2 guests
