Page 1 of 1

creating a new series by copying data from lots of series

Posted: Mon Sep 08, 2014 8:54 pm
by marinagruc
Hello,
I made a program with 24 forecasts for each series that I have. Each forecast I made 1 step ahead. Now I want to create a new series only with the forecast one step ahead.
So for example I'll have to create a new series where in 2012M2 I'll have the number of another serie (for example Avic_f_1), in 2012M3 I'll have the number of this date from another serie (ex: Avic_f_2), and so on.... But I dont know how to do this...

here is what I've already did:

wfcreate m 2005:1 2016:12
open C:\Users\mgruc\Desktop\abpo.xlsx

for !i=1 to 24
smpl @first "2012M1"+!i-1

for %y Avic Bebidas Chapas Diversos Fumos hortifrutiflor Mademobi transportes eletricoecomun Mecanica Metalurgica Papel alimentacao farmperfumaria plastborr Quimicos TexteisVest VidroseCeramica Total

equation {%y}_!ieq.ls {%y} c ar(1) ar(2) ar(3)

'Doing the forecast
smpl "2012M1"+!i "2016M12"
{%y}_!ieq.forecast {%y}_f_!i

'choose again the sample for the equation
smpl @first "2012M1"+!i-1

next
next

From now on I dont have any clue where should I start... I need first of all to create a new series for the 1 step forecast, and start to copy for each date, the number from a different series.
Can you help me or give some example?
Thank you,

Re: creating a new series by copying data from lots of serie

Posted: Mon Sep 08, 2014 9:59 pm
by EViews Gareth

Code: Select all

for !i=1 to 24 smpl "2012M1"+!i-1 "2012M1"+!i-1 series forecast_{%y} = {%y}_f_{!i} next

Re: creating a new series by copying data from lots of serie

Posted: Tue Sep 09, 2014 5:58 am
by marinagruc
Thank you very much!!