remove cross sections from panel

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

treefarm
Posts: 7
Joined: Thu Sep 20, 2012 11:58 am

remove cross sections from panel

Postby treefarm » Wed Sep 02, 2015 12:06 pm

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.

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

Re: remove cross sections from panel

Postby EViews Gareth » Wed Sep 02, 2015 12:19 pm

The not operator in EViews is <>

treefarm
Posts: 7
Joined: Thu Sep 20, 2012 11:58 am

Re: remove cross sections from panel

Postby treefarm » Wed Sep 02, 2015 1:00 pm

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 ".

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

Re: remove cross sections from panel

Postby EViews Gareth » Wed Sep 02, 2015 1:06 pm

You need to replace @crossid with the name of your cross-section identifier.

treefarm
Posts: 7
Joined: Thu Sep 20, 2012 11:58 am

Re: remove cross sections from panel

Postby treefarm » Wed Sep 02, 2015 2:13 pm

OK, I did that. I now no longer get an error message; however, the unwanted cross-sections are still present in my workfile.

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

Re: remove cross sections from panel

Postby EViews Gareth » Wed Sep 02, 2015 2:39 pm

Could you post the file?

treefarm
Posts: 7
Joined: Thu Sep 20, 2012 11:58 am

Re: remove cross sections from panel

Postby treefarm » Thu Sep 03, 2015 1:56 pm

Thanks for offering to take a look. I just need to check if the data in the file is OK to distribute.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests