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
delete observations
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
Re: delete observations
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.
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
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.
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.
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: delete observations
Code: Select all
smpl 1970 1974 1978 1990 1992 2012
Re: delete observations
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.
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.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: delete observations
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 18 guests