panel data: removing data cross-sectional individuals

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

helplessbunny
Posts: 8
Joined: Tue Jun 18, 2013 10:58 am

panel data: removing data cross-sectional individuals

Postby helplessbunny » Mon Aug 19, 2013 8:06 am

!detect and eliminate constant cross-sectional individuals!

Hi!

I am working with a weakly balanced panel and I want to do a ABI and II estimation which uses FD for IV generation.

My dependent variable is binary. Therefore I want to eliminate all cross-sectional individual that are constant in all time periods. (my Prof told me to do that before I proceed with FD)

So if f.e. individual 1 is 0 in all periods, I want to remove the individual not only form the dependent variable, but from the whole data set, ergo all 7 colums. Individual 2 changes from 0 to 1 half way through the periods, so all periods should be spared.

Is this possible? Did I overlook something in the manual?

Sincerely

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

Re: panel data: removing data cross-sectional individuals

Postby EViews Gareth » Mon Aug 19, 2013 8:12 am

Set the sample to be:

Code: Select all

if @varsby(Y, @crossid)<>0
where Y is the name of your dependent variable.

@varsby(Y, @crossid) calculates the variance of Y by cross-section. If Y takes the same value for each period for a cross-section, its variance will be 0. So simply set the sample to be any observations where the variance isn't 0.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests