Page 1 of 1

extending dated series by one observation (a scalar)

Posted: Wed Apr 23, 2014 6:52 am
by Fregensburg
Dear Eviews experts,

I'd really appreciate if you could help me with this:
I have a series y. I have a scalar s, which I got from combining some forecasts. I want to extend y by one observation -the scalar. I've searched manuals and forum but couldn't find a way.
Side note:
I cannot use actual dates in the program lines -whatever they are- because I have to put this in a loop to back-test some awful forecasting models (basically cutting short the dependent variable to a year ago, keeping all regressors to their most recent sample size, and adding each one-step ahead forecast to the dependent variable in a recursive fashion. Utterly pointless, but I have to do it).

Thanks very much!

Re: extending dated series by one observation (a scalar)

Posted: Wed Apr 23, 2014 12:54 pm
by EViews Gareth
Does the workfile already contain that date? (i.e. is the series long enough to contain that value, and currently has NA)?

Re: extending dated series by one observation (a scalar)

Posted: Wed Apr 23, 2014 2:44 pm
by Fregensburg
Hi Gareth,

Yes, it does, I over-provided, so plenty of NAs up front.

Re: extending dated series by one observation (a scalar)

Posted: Wed Apr 23, 2014 2:57 pm
by EViews Gareth

Code: Select all

!date = @ilast(x) %date = @otod(!date+1) smpl {%date} {%date} x = myscalar
or something along those lines.

Re: extending dated series by one observation (a scalar)

Posted: Thu Apr 24, 2014 2:18 am
by Fregensburg
that was basically no effort for you, was it? you should try and learn an instrument, I bet you'd pick it up in no time. a tip: electric guitars are very satisfactory.