Page 1 of 1

Remove firms in panel data

Posted: Mon Feb 10, 2014 6:48 am
by asdf
I have a panel data with annual data against some firm identifier. For some yearly observations of the firm I am missing a variable and I would like to set a sample without those firms. How can i accomplish this?

Say data is year, firmid, CEOwage and I wan't to remove the firmed's where it has an observation where CEOwage is missing.

Thanks a lot :)

Re: Remove firms in panel data

Posted: Mon Feb 10, 2014 9:07 am
by EViews Gareth

Code: Select all

smpl if ceowage<>na

Re: Remove firms in panel data

Posted: Mon Feb 10, 2014 9:22 am
by asdf
Will that not only remove the years with missing CEOwage? and leave the observation of the firm where i have it? I'm looking to remove the exclude the entire history of the firm if at least one observation is missing.

Re: Remove firms in panel data

Posted: Mon Feb 10, 2014 9:31 am
by EViews Glenn

Code: Select all

smpl if @nasby(ceowage, firmid)=0
where FIRMID is the identifier for your firm. The @nasby counts the number of NAs in CEOWAGE in each of the FIRMIDs and match-merges it back to the firm. So for a firm which has a CEOWAGE NA, all of it's observations will have the common non-zero count of NAs.