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 Moderator, EViews Jason, EViews Matt
-
Fregensburg
- Posts: 38
- Joined: Tue Jan 21, 2014 4:04 am
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- 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)?
-
Fregensburg
- 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.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- 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
-
Fregensburg
- 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 3 guests
