Hi,
I am wondering whether there is any way to make the sample range dependent on the observations within a series.
To be more precise let's assume the following situation.
I have a sheet with annual frequency and 1990 - 2010 sample. There is also a time series in this sheet with numerical values for 1995-2005 and NA values for the remaining time references.
How can I set up a sample range so that it is only as of the first non-missing observation in the series/ second non-missing observation/ the last non missing observation?
I would appreciate the help very much.
Best, k
sample range dependent on the time series
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: sample range dependent on the time series
Follow us on Twitter @IHSEViews
Re: sample range dependent on the time series
This looks good and it definately solves part of my problems.
If you could also tell me how to set up a sample range so that it starts from second non-missing observation that would be really fantastic
If you could also tell me how to set up a sample range so that it starts from second non-missing observation that would be really fantastic
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: sample range dependent on the time series
Code: Select all
smpl if x <> na
series smplser=1
smpl if @cumsum(smplser)>2 and x <> na
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 18 guests