delete observations

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

anl
Posts: 1
Joined: Wed Jun 17, 2009 1:30 am

delete observations

Postby anl » Wed Jun 17, 2009 2:39 am

Hi!!

I have a dataset that I have devided into 66 different workfiles. Each workfile consisting of several observation each day during one year, I have made some new columns by using "generate series by equation". Unfortunately I have now found out that this is biased and I need to delete the first observation each day. I dont know how to do this(without deleting one by one, which would take a week), can you help me with this? In addition, the new columns need to be updated..

anl

Casper
Posts: 1
Joined: Fri Oct 16, 2009 1:15 am

Re: delete observations

Postby Casper » Fri Oct 16, 2009 1:39 am

Hi. I see that the question was posted some time ago, but I recently run into the same difficulty and thought I could post one method to solve it here in case other people are struggling with the same.

1. Create a sample containing only the observations you want to keep. If you want to combine criteria, the if NOT method is useful. Let's say you've created a series, first_obs_that_day, which identifies the first observations each day. However, you only want to delete those observations before 2008.

sample mysample if NOT (criteria for deletion, e.g. first_obs_that_day=1 and year<2008)

2. Copy the sample to a new page and (optionally) delete the old one

pagecopy(smpl=mysample, page="NewPage")
pageselect NewPage
pagedelete OldPage
delete mysample

In your case, you might need to loop this routine for all your workfiles, but that should be easy to automate.

Casper.

Santosh
Posts: 26
Joined: Mon Sep 26, 2016 11:00 am

Re: delete observations

Postby Santosh » Wed Oct 12, 2016 12:33 am

Hello,
I want my sample to constitute like this: 1970 2012. However, i want to drop, say, 1975 to 1977, and 1991.
How to specify the sample.
Can anyone plz help?
Thank you.

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: delete observations

Postby startz » Wed Oct 12, 2016 5:54 am

Code: Select all

smpl 1970 1974 1978 1990 1992 2012

Santosh
Posts: 26
Joined: Mon Sep 26, 2016 11:00 am

Re: delete observations

Postby Santosh » Wed Oct 12, 2016 10:21 am

Thank you

Santosh
Posts: 26
Joined: Mon Sep 26, 2016 11:00 am

Re: delete observations

Postby Santosh » Mon Oct 17, 2016 2:01 pm

Hello,
I have monthly data for series X. I want to convert X in to quarterly data.
Can anyone please suggest how to generate this?
Thank you in advance.

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

Re: delete observations

Postby EViews Gareth » Mon Oct 17, 2016 2:02 pm

Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 18 guests