Page 1 of 1

38 estimations and forecasts

Posted: Wed Nov 20, 2013 4:52 am
by suraya
Hi There,

I have 38 pairwise estimations and I want to run forecasts for each. My end point is to create a coefficient mean from the 38 estimations . I am looking for the command code to pick up the last observation from each X so I can produce an one step ahead forecast. The start and end of each X is different so there is no point in setting a date as I am only looking for one step ahead forecast.

One more quick question I will also want to generate out of sample for all the 38 estimations, any tips to do this efficiently when you have 38 estimations and 38 forecasts... I would need coefficients, and evaluation stats so I have the RMSE

My short program (I am using eviews 8) looks like

wfopen eviews_log

'create 38 X series
for !i=1 to 38
next

'run pairwise regressions between Y and each X
for !i=1 to 38
equation eq{!i}.ls y1 c d(y1)-1 d(x{!i})-1
next

'forecast
for !i=1 to 38
'smpl 7/01/2013 07/01/2013 this is where I need help
eq{!i}.forecast y1f{!i}
next

Re: 38 estimations and forecasts

Posted: Wed Nov 20, 2013 9:19 am
by EViews Gareth
You're best off using the same loop to do the estimation and the forecast (i.e. forecast from each equation immediately, rather than estimating all equations, then forecasting all equations. Then you can use the resid series to tell you which observations were in the estimation and which weren't.
Something like:

Code: Select all

for !i=1 to 38 smpl @all equation eq{!i}.ls y1 c d(y1)-1 d(x{!i})-1 %last = resid.@last smpl {%last}+1 {%last}+2 eq{!i}.forecast y1f{!i} next