Page 1 of 1

Contract panel workfile

Posted: Mon Mar 30, 2015 11:23 am
by JhonnyCa
Hi,
I'm using eviews8. I have a dated panel workfile with >500 cross sections (stocks) and 7 variables/series. I want to drop those stocks (that is the entire cross-sections) for which any of the 7 variables doesn't have at least one observation. So if for a specific stock there are all variables available except one - let's say the variable "dividend", that has only NA's - I want to completely remove this stock/cross section from the workfile. I couldn't figure out how to program this task. Thank you in advance for your help!

Re: Contract panel workfile

Posted: Mon Mar 30, 2015 11:42 am
by EViews Gareth

Code: Select all

pagecontract if (@obsby(x1, @crossid)>0 and @obsby(x2,@crossid)>0 and @obsby(x3, @crossid>0) and @obsby(x4, @crossid>0) and @obsby(x5, @crossid>0) and @obsby(x6, @crossid>0) and @obsby(x7, @crossid>0))
I can't tell from your post whether you want those "ands" to be "ands" or "ors", but try it with both :D

Re: Contract panel workfile

Posted: Mon Mar 30, 2015 12:14 pm
by JhonnyCa
Thank you very much, it works out smoothly!