Eviews 6 user
I want to limit my sample to m 1994 2013 by using the @now function (or some other) so I can say smpl current year minus 20 years to current year
@now function?
Moderators: EViews Gareth, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: @now function?
I don't have EViews 6 on me, but in EViews 7, you can simply do:
I think it will work in EViews 6 too.
Code: Select all
smpl @now-20 @now
I think it will work in EViews 6 too.
Follow us on Twitter @IHSEViews
Re: @now function?
Thanks Gareth for the speedy response
Here's a snippet of my code
wfcreate(page=input) m 1992 2020
smpl @now-20 @now
(or maybe smpl @now-240 @now because it's monthly)
read(f128,s=upload core) etc.
Kicks off this Error Message--
Error in Sample: Illegal date @NOW in "SMPL @NOW-20 @NOW"
Here's a snippet of my code
wfcreate(page=input) m 1992 2020
smpl @now-20 @now
(or maybe smpl @now-240 @now because it's monthly)
read(f128,s=upload core) etc.
Kicks off this Error Message--
Error in Sample: Illegal date @NOW in "SMPL @NOW-20 @NOW"
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: @now function?
Seems that functionality wasn't in EViews 6. Have to do it the long way:
Code: Select all
wfcreate(page=input) m 1992 2020
%date1 = @datestr(@dateadd(@now,-20,"YY"),"YYYY-MM-DD")
%date2 = @datestr(@now, "YYYY-MM-DD")
smpl {%date1} {%date2}
Follow us on Twitter @IHSEViews
Return to “General Information and Tips and Tricks”
Who is online
Users browsing this forum: No registered users and 9 guests