Page 1 of 1

Deleting a cross section from a panel

Posted: Sun Mar 25, 2012 5:04 am
by Pilot013
Hello!

I am currently writing my bachelor thesis and my topic is related to the link between economic growth and public debt. I have a panel of 17 countries, followed on several variables from 1980-2012. My cross sections are the countries as you perhaps think. I want to delete 2-3 countries from the list, because I have a lot of missing data for them in the period 1980-1990 and they bias the results afterwards. In this sense, I would like to perform 2 estimations:

1) For all the countries from 1990-2010 with Fixed effects and
2) Only for the countries I have data from 1980-2010 again with Fixed effects.

Unfortunately, I couldn't figure out how to delete cross sections from E-views.

Thanks in advance for your advice!

Kind regards from Denmark! :)

Re: Deleting a cross section from a panel

Posted: Sun Mar 25, 2012 9:06 am
by EViews Gareth
Do you want to actually delete them, or just not include them in the estimation?

If the former, simply put something like this as your sample:

Code: Select all

1980 2010 if @crossid<>15 and @crossid<>7
Where 15 and 7 are the cross-sections you don't want.

Re: Deleting a cross section from a panel

Posted: Sun Mar 25, 2012 1:05 pm
by Pilot013
Hi Gareth!

Thanks a lot for your answer - this did the trick! :-) I have some other questions as well, since I am at the final stage of my thesis so I am just trying to estimate the model correctly and test for endogeneity, serial correlation, causality and goodness-of-fit. I will post those questions in another topic. I have been studying in the university of Aarhus. During our Econometrics course we studied only cross-sectional data estimation and analysis. I got a big confused with some of the interpretations of the Beta coefficients. As I am dealing with a lot of ratios (Debt/GDP, Investments/GPD, Current Account balance/GDP, etc..), I get a confused how to interpret the results if my explained variable is in a ratio form and the explanatory set of variables as well.

Thanks once again for now and these days, I will post my other questions in a structured form.

Kind regards! :)

Re: Deleting a cross section from a panel

Posted: Fri Jun 21, 2013 12:44 pm
by yzerman
Do you want to actually delete them, or just not include them in the estimation?

If the former, simply put something like this as your sample:

Code: Select all

1980 2010 if @crossid<>15 and @crossid<>7
Where 15 and 7 are the cross-sections you don't want.
Gareth,

What if I actually wanted to delete some cross-sections to reduce the size of my file?

Re: Deleting a cross section from a panel

Posted: Fri Jun 21, 2013 3:00 pm
by EViews Gareth
Use the pagecontract command.

Re: Deleting a cross section from a panel

Posted: Fri Aug 12, 2016 3:21 am
by Tuinsmurf
Hi there,

I am using panel data for the period 1984-2008 with 8 countries.

I'd like to alter my sample for the same period to exclude the following cross sections: Iran, Israel, Malta and New Zealand

How would I go about this in terms of code?

Re: Deleting a cross section from a panel

Posted: Fri Aug 12, 2016 8:06 am
by EViews Gareth

Code: Select all

smpl 1984 2008 if country<>"Iran" and country<>"Israel"....

Re: Deleting a cross section from a panel

Posted: Tue Aug 16, 2016 4:26 am
by Tuinsmurf
Thank you Gareth!!