Delete observation from a panel data

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

michelleli
Posts: 20
Joined: Wed Jul 20, 2011 3:55 pm

Delete observation from a panel data

Postby michelleli » Tue Feb 28, 2012 9:49 pm

Hi,
I am running a logit model using a panel data. After all the univariate analysis and regression analysis, I found I included an observation that should not be included. My question is how can I delete the observation from my workfile completely. After doing so, are the results of univariate analysis and regression analysis going to change automatically ?


Cheers

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

Re: Delete observation from a panel data

Postby EViews Gareth » Wed Feb 29, 2012 8:44 am

Usually the best way is to just not include it in the sample.

In panels this is a little more tricky, but as an example, say you want to exclude the observation at 1995 for the country USA (in an annual workfile from 1990-2000 with countries as the cross-section id), you would set the sample as follows:

Code: Select all

smpl 1990 1994 1996 2000 if country<>"USA"


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests