Page 1 of 1
delete observations
Posted: Wed Jun 17, 2009 2:39 am
by anl
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
Re: delete observations
Posted: Fri Oct 16, 2009 1:39 am
by Casper
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.
Re: delete observations
Posted: Wed Oct 12, 2016 12:33 am
by Santosh
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.
Re: delete observations
Posted: Wed Oct 12, 2016 5:54 am
by startz
Code: Select all
smpl 1970 1974 1978 1990 1992 2012
Re: delete observations
Posted: Wed Oct 12, 2016 10:21 am
by Santosh
Thank you
Re: delete observations
Posted: Mon Oct 17, 2016 2:01 pm
by Santosh
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.
Re: delete observations
Posted: Mon Oct 17, 2016 2:02 pm
by EViews Gareth