Page 1 of 1

last and last+1 in smpl statements for all series

Posted: Wed Mar 12, 2014 3:08 am
by Fregensburg
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

Re: last and last+1 in smpl statements for all series

Posted: Wed Mar 12, 2014 7:29 am
by EViews Gareth
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:

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

Re: last and last+1 in smpl statements for all series

Posted: Wed Mar 12, 2014 10:50 am
by Fregensburg
Thank you. When I do as you say, something like:

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)
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

Re: last and last+1 in smpl statements for all series

Posted: Wed Mar 12, 2014 11:09 am
by EViews Gareth
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)

Re: last and last+1 in smpl statements for all series

Posted: Wed Mar 12, 2014 11:21 am
by Fregensburg
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?

Re: last and last+1 in smpl statements for all series

Posted: Wed Mar 12, 2014 11:30 am
by EViews Gareth
Works for me:

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)
Post your workfile/program