Page 1 of 1

remove cross sections from panel

Posted: Wed Sep 02, 2015 12:06 pm
by treefarm
Hello,

I am using EViews version 7.2. I have a balanced panel workfile with annual data from 1990 to 2002 and 44 cross sections (572 observations). The cross sections are identified with words rather than numbers. I would like to run an estimation with 6 of the cross sections removed. I tried going into "contract current page" and using a command like this.

Sample of observations to keep within the workfile:

1990 2002 if @crossid not "name one" and @crossid not "name two" and @crossid not "name three" and @crossid not "name four" and @crossid not "name five" and @crossid not "name six"

But I got an syntax error, and I'm not sure what is wrong.

Thanks in advance.

Re: remove cross sections from panel

Posted: Wed Sep 02, 2015 12:19 pm
by EViews Gareth
The not operator in EViews is <>

Re: remove cross sections from panel

Posted: Wed Sep 02, 2015 1:00 pm
by treefarm
Thanks for your reply. I tried "<>" also, but got the error message "Error in Sample: Numeric operator applied to string data". That is why I tried replacing "<>" with " not ".

Re: remove cross sections from panel

Posted: Wed Sep 02, 2015 1:06 pm
by EViews Gareth
You need to replace @crossid with the name of your cross-section identifier.

Re: remove cross sections from panel

Posted: Wed Sep 02, 2015 2:13 pm
by treefarm
OK, I did that. I now no longer get an error message; however, the unwanted cross-sections are still present in my workfile.

Re: remove cross sections from panel

Posted: Wed Sep 02, 2015 2:39 pm
by EViews Gareth
Could you post the file?

Re: remove cross sections from panel

Posted: Thu Sep 03, 2015 1:56 pm
by treefarm
Thanks for offering to take a look. I just need to check if the data in the file is OK to distribute.