Hi
If I want to have a sample of the last 6 months of my workbook I can use the code:
sample sample1 @last-6 @last
Is there a way to do this with the last date of a series rather than the last date in the workbook?
Thanks!
sample question - using series info
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: sample question - using series info
Code: Select all
%lastdate = @otod(@ilast(y)-6)
smpl {%lastdate} @last
Where y is the series.
Follow us on Twitter @IHSEViews
-
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: sample question - using series info
Thanks Gareth.
I was looking to use the last date of the sample as the last date in my series. I was able to easily adjust your example to get that though, so for future readers looking how to do this:
I was looking to use the last date of the sample as the last date in my series. I was able to easily adjust your example to get that though, so for future readers looking how to do this:
Code: Select all
%lastdate = @otod(@ilast(CANADAALLSTARTS))
smpl {%lastdate}-5 {%lastdate}
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: sample question - using series info
That first line could be simplified as:
Code: Select all
%lastdate = CANADAALLSTARTS.@last
Follow us on Twitter @IHSEViews
-
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Who is online
Users browsing this forum: No registered users and 21 guests