structuring a panel workfile

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

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

letch
Posts: 4
Joined: Wed Feb 25, 2009 12:15 am

structuring a panel workfile

Postby letch » Wed Feb 25, 2009 12:31 am

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.
eviews send.xls
bilateral trade data
(403 KiB) Downloaded 724 times

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

Re: structuring a panel workfile

Postby EViews Gareth » Wed Feb 25, 2009 9:10 am

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.

letch
Posts: 4
Joined: Wed Feb 25, 2009 12:15 am

Re: structuring a panel workfile

Postby letch » Sat Feb 28, 2009 12:14 am

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

Postby EViews Gareth » Sat Feb 28, 2009 12:21 pm

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...

letch
Posts: 4
Joined: Wed Feb 25, 2009 12:15 am

Re: structuring a panel workfile

Postby letch » Mon Mar 02, 2009 12:54 am

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

Postby EViews Glenn » Mon Mar 02, 2009 10:18 am

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.

letch
Posts: 4
Joined: Wed Feb 25, 2009 12:15 am

Re: structuring a panel workfile

Postby letch » Tue Mar 03, 2009 4:38 am

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

Postby EViews Gareth » Tue Mar 03, 2009 9:04 am

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).


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests