Dear all,
I am fitting an arimax (arima with some extra explanatory variables)
model to a time series. Say, I have a Y (dependent variable) and an X
(explanatory).
Y is 100 observations (time series) and X is 100 + 20 (20 to use for the
forecast horizon).
I can not make xreg work with the forecast function for an arima fit.
The "predict" function seems to be working but the
"forecast" returns
> Error in predict.Arima(object, n.ahead = h) : 'xreg' and
'newxreg'
have different numbers of columns...
Xreg is a time series of explanatory variables of the same length of the
dependent and newxreg should be as long as the forecast horizon (same
number of explanatory variables). Is this right?
Or should xreg be: X[1:100] and newxreg X[101:20], i.e. use different
segments of the same regressor ???
In other words, can/should newxreg and xreg be different variables as
long as their lengths are according to the forecast horizon specs? This
doesn't seem to work...
Any scripts/demos would be extremely welcome.
Thanks,
COstas
P Think before you print.
Disclaimer:
This e-mail is confidential. If you are not the intended recipient, you should
not copy it, re-transmit it, use it or disclose its contents, but should return
it to the sender immediately and delete the copy from your system.
EFG Eurobank Ergasias S.A. is not responsible for, nor endorses, any opinion,
recommendation, conclusion, solicitation, offer or agreement or any information
contained in this communication.
EFG Eurobank Ergasias S.A. cannot accept any responsibility for the accuracy or
completeness of this message as it has been transmitted over a public network.
If you suspect that the message may have been intercepted or amended, please
call the sender.
[[alternative HTML version deleted]]