Page 1 of 1

dynamic backcasting of time series

Posted: Mon Mar 21, 2011 4:08 pm
by Krzysztof
Hi,
I have one question related to backcasting. I'd like to backcast values for time series having the most recent value in line with the growth rates of another time series.
However, if I try to fill up my time series using the below line of code it does not work dynamically (only statically for one observation(t) ).
any ideas appreciated
best, Krzysztof

Code: Select all

aSer = @nan(aSer, aSer(+1)*aSer2/aSer2(+1))
aSer - series to be backcasted
aSer2 - series containing the growth rates for backcasting

Re: dynamic backcasting of time series

Posted: Mon Mar 21, 2011 4:12 pm
by EViews Gareth
Unfortunately the only way to do it is with a for loop that loops through the observations one by one, filling them in.

Edit: Alternatively, you could create a trend series (series t=@trend), then sort the workfile by that trend, but in descending order (proc->Sort current page). That will reverse the order of the workfile. Once you've done that, you no longer need to backcast - now you're forecasting, which EViews will allow.

Re: dynamic backcasting of time series

Posted: Tue Oct 07, 2014 12:19 pm
by leah
Is this still the case or has something been developed that doesn't require a for loop?

Re: dynamic backcasting of time series

Posted: Tue Oct 07, 2014 12:26 pm
by EViews Gareth
genr(r) will create a series in reverse.

Re: dynamic backcasting of time series

Posted: Tue Oct 07, 2014 12:40 pm
by leah
So what syntax would you use (e.g. if you want to reverse series x)? Or a page number in the command ref? I'm having trouble finding documentation for the genr options.

Re: dynamic backcasting of time series

Posted: Tue Oct 07, 2014 1:07 pm
by EViews Gareth

Code: Select all

genr(r) x=0.2*x(1)

Re: dynamic backcasting of time series

Posted: Tue Oct 07, 2014 1:12 pm
by leah
At least for me, that results in NAs. x.adjust \ seems to work though.

Re: dynamic backcasting of time series

Posted: Tue Oct 07, 2014 1:15 pm
by EViews Gareth
You have to make sure you have the sample right.