Dear Eviews experts,
I have a workfile in which I over-provided, up to 2015 (so I can add data from an excel file that I update with additional observations every week). Weekly, I will be using a program to estimate a model using all observations –thus until 3/7/2014, leaving out all NA-, and I will solve the model one step ahead, so through to 14/7/2014. In both cases the start date is fixed, say 1/03/2009. What lines of code in the smpl statements do I need for that?
Many thanks
last and last+1 in smpl statements for all series
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
Fregensburg
- Posts: 38
- Joined: Tue Jan 21, 2014 4:04 am
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: last and last+1 in smpl statements for all series
Estimate over the entire range - EViews will figure out which observations are available for you automatically.
Then use the residual series to figure out the observations that were actually used. Thus something like:
Then use the residual series to figure out the observations that were actually used. Thus something like:
Code: Select all
smpl 1/03/2009 @last
equation eq1.ls y c x
!lst = @ilast(resid)
%forc = @otod(!lst+1)
smpl 1/03/2009 {%forc}
eq1.forecast yf
-
Fregensburg
- Posts: 38
- Joined: Tue Jan 21, 2014 4:04 am
Re: last and last+1 in smpl statements for all series
Thank you. When I do as you say, something like:
I get an error message, to the effect of:
Sample endpoints adjusted for lags leads leaving no observation to solve in “DO_VARMOD.SOLVE(D=S)”
Could you advice on how to proceed?
Thanks again
Code: Select all
smpl 1/03/2009 @last
var var1.ls1 3 dlog(y,0,1) dlog(x,0,1)
!lst = @ilast(resid)
%forc = @otod( !lst+1)
smpl 1/03/2009 {%forc}
var1.makemodel(varmod)
varmod.solve(d=s)
Sample endpoints adjusted for lags leads leaving no observation to solve in “DO_VARMOD.SOLVE(D=S)”
Could you advice on how to proceed?
Thanks again
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: last and last+1 in smpl statements for all series
Ah, from a VAR you'll have to make the residual series yourself, rather than use the built in one:
Code: Select all
smpl 1/03/2009 @last
var var1.ls1 3 dlog(y,0,1) dlog(x,0,1)
var1.makeresid r1 r2
!lst = @ilast(r1)
%forc = @otod( !lst+1)
smpl 1/03/2009 {%forc}
var1.makemodel(varmod)
varmod.solve(d=s)
-
Fregensburg
- Posts: 38
- Joined: Tue Jan 21, 2014 4:04 am
Re: last and last+1 in smpl statements for all series
Many thanks for such a rapid response. I still get the same error message though. Maybe there's an alternative way to set the sample?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: last and last+1 in smpl statements for all series
Works for me:
Post your workfile/program
Code: Select all
create w 2009 2014
smpl @first @now
series y=rnd
series x=rnd
smpl 1/03/2009 @last
var var1.ls 1 3 dlog(y,0,1) dlog(x,0,1)
var1.makeresid r1 r2
!lst = @ilast(r1)
%forc = @otod( !lst+1)
smpl 1/03/2009 {%forc}
var1.makemodel(varmod)
varmod.solve(d=s)
Who is online
Users browsing this forum: No registered users and 2 guests
