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!
extending dated series by one observation (a scalar)
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Posts: 38
- Joined: Tue Jan 21, 2014 4:04 am
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13323
- Joined: Tue Sep 16, 2008 5:38 pm
Re: extending dated series by one observation (a scalar)
Does the workfile already contain that date? (i.e. is the series long enough to contain that value, and currently has NA)?
Follow us on Twitter @IHSEViews
-
- Posts: 38
- Joined: Tue Jan 21, 2014 4:04 am
Re: extending dated series by one observation (a scalar)
Hi Gareth,
Yes, it does, I over-provided, so plenty of NAs up front.
Yes, it does, I over-provided, so plenty of NAs up front.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13323
- Joined: Tue Sep 16, 2008 5:38 pm
Re: extending dated series by one observation (a scalar)
Code: Select all
!date = @ilast(x)
%date = @otod(!date+1)
smpl {%date} {%date}
x = myscalar
or something along those lines.
Follow us on Twitter @IHSEViews
-
- Posts: 38
- Joined: Tue Jan 21, 2014 4:04 am
Re: extending dated series by one observation (a scalar)
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.
Who is online
Users browsing this forum: No registered users and 40 guests