[R] R: ARIMA forecasting

Malte Rüsing mail at malte-ruesing.de
Fri Mar 2 20:23:45 CET 2007


Dear all,


I just have a short question regarding the forecasting of ARIMA models with
external regressors. 

I tried to program a ARX(1) model
	arx.mod <- arima(reihe.lern, order = c(1, 0, 0), seasonal =
list(order = c(0, 0, 0), period = 52), xreg = lern.design, include.mean =
TRUE)
for which I need to estimate the next (105th) value. Xreg=lern.design is -
at this time - 104 rows long. I tried to use the following function:
	predict(arx.mod, n.ahead = 1, newxreg=lern.design[105,])

Here, lern.design is 105 rows long, same number of columns. Now the problem
is the following error:
	Error in predict.Arima(arx.mod, n.ahead = 1, newxreg =
lern.design[105,  : 
        'xreg' and 'newxreg' have different numbers of columns

If I use the total "new" lern.design matrix with the external regressor
information (105 rows), R estimates every observation and the 105th is no
longer correct (I recalculated is manually).

What can I do? I just need the forecasted value for the 105th observation so
that I can add this to my data and create a new one-step forecast.

Thanks for your help!


Kind regards
Malte Rüsing



More information about the R-help mailing list