0
$\begingroup$

This question concerns question 4h of this textbook exercise. It asks to make future predictions based on a chosen TSLM model which involves an endogenously (if i'm using this right) made dummy variable based off certain time points. My main code is as follows enter image description here

The main problem I've encountered is that when I use forecast() on my model, it gives an error message: enter image description here

This is very confusing because shouldn't my modified data already include the dummy variables? Hence, the model includes it and should be able to forecast the data. Yet it doesn't. Is there something I'm not doing?

$\endgroup$

1 Answer 1

0
$\begingroup$

If you use exogenous variables, then you need to provide their future values in the forecast() function. You only provide the value of Festival for the historic time periods used in training the model. The forecast() function needs to know the values of Festival for the future time periods.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.