Page 1 of 1

structuring a panel workfile

Posted: Wed Feb 25, 2009 12:31 am
by letch
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 729 times

Re: structuring a panel workfile

Posted: Wed Feb 25, 2009 9:10 am
by EViews Gareth
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

Posted: Sat Feb 28, 2009 12:14 am
by letch
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!

Re: structuring a panel workfile

Posted: Sat Feb 28, 2009 12:21 pm
by EViews Gareth
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...

Re: structuring a panel workfile

Posted: Mon Mar 02, 2009 12:54 am
by letch
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?

Re: structuring a panel workfile

Posted: Mon Mar 02, 2009 10:18 am
by EViews Glenn
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.

Re: structuring a panel workfile

Posted: Tue Mar 03, 2009 4:38 am
by letch
sorry about it but how do i input @expand in the equation estimation? does it work if i have only 2 years?

Re: structuring a panel workfile

Posted: Tue Mar 03, 2009 9:04 am
by EViews Gareth
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).