Forming a series
Posted: Sat Nov 12, 2011 3:26 am
Dear Glenn, Gareth and all,
allows me to create dynamic forecast of 4 periods for each horizon.
e.g y_f95 gives dynamic forecast for 2002q2 to 2003q1 while the rest are unchanged.
y_f96 gives 2002q3 to 2003q2 etc.
i hope to sum the values in y_f95 from 2002q2 to 2003q1 and divide by 4 before storing the value in another new series called zebra in 2002q1.
this means a sum divide and append to new series.
can u teach me how to do so using this code or another code seperately? i cant seem to find any links on extraction of value and appending it back.
thk u so much.
Code: Select all
series y = z_piet1a
series x = mu
for !horizon= 95 to 126
smpl 1978q1 1978q1+!horizon
var var{!horizon}.ls 1 3 y x
smpl 1978q1+!horizon+2 1978q1+!horizon+5
var{!horizon}.fcast _f{!horizon}
next
smpl @alle.g y_f95 gives dynamic forecast for 2002q2 to 2003q1 while the rest are unchanged.
y_f96 gives 2002q3 to 2003q2 etc.
i hope to sum the values in y_f95 from 2002q2 to 2003q1 and divide by 4 before storing the value in another new series called zebra in 2002q1.
this means a sum divide and append to new series.
can u teach me how to do so using this code or another code seperately? i cant seem to find any links on extraction of value and appending it back.
thk u so much.