## forecasting/equation estimation question

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

BT454
Posts: 106
Joined: Wed Aug 02, 2017 6:07 am

### forecasting/equation estimation question

Hi all!
I'm trying to specify an equation, and create a forecast for variable x on a daily (d7) basis. However, I would like to use the previous day's value for x as part of the estimation/forecast, i.e. the x = B1*x(-1) + B2*some other variable, so that when forecasting the next value, of x it uses the last forecasted value of x as part of the calculation. Is there a way to do this without crashing the equation estimation due to missing variables or without looping through the forecast for each day of forecast period?
Thanks!
Bob

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12908
Joined: Tue Sep 16, 2008 5:38 pm

### Re: forecasting/equation estimation question

Aren't you just describing dynamic forecasting?

BT454
Posts: 106
Joined: Wed Aug 02, 2017 6:07 am

### Re: forecasting/equation estimation question

I absolutely am. I can't seem to find how to code it up. Could you steer me toward the code? I already have my model option set to dynamic (d=d), but can't seem to figure out how to get the equation to estimate with dynamic forecasting variable.
Thanks!
Bob

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12908
Joined: Tue Sep 16, 2008 5:38 pm

### Re: forecasting/equation estimation question

eh?

When you estimate an equation you don't need to tell the equation whether to do a dynamic forecast or not, since you're not forecasting, you're estimating.

When you forecast from an equation, you can either use eq.forecast (which does a dynamic forecast) or eq.fit (which does not).

BT454
Posts: 106
Joined: Wed Aug 02, 2017 6:07 am

### Re: forecasting/equation estimation question

Perfect. Thank you!