[R] [FORGED] Fitting arima Models with Exogenous Variables

Rolf Turner r.turner at auckland.ac.nz
Fri Jan 20 22:41:27 CET 2017


On 21/01/17 02:29, Paul Bernal wrote:
> Dear friends,
>
> I have 5 exogenous variables which I´d like to incorporate into my
> auto.arima model.
>
> I was able to incorporate the xreg, and I understand that newxreg should be
> the forecast of my exogenous variables, but I have not been able to get it
> to work.
>
> Newxreg should only have one column? Should newxreg have the same number of
> rows of the training data?
>
> This is the error I keep getting but I don´t quite understand:
>
> Error in forecast.Arima(ModelAfit, h = 12, newxreg = NewXreg) :
>   No regressors provided
> In addition: Warning message:
> In forecast.Arima(ModelAfit, h = 12, newxreg = NewXreg) :
>   The non-existent newxreg arguments will be ignored.
>
> Any help will be greatly appreciated,

You need to provide a *reproducible example*.  (Including data --- 
built-in data set, dput output, or simulation recipe with a seed set --- 
and an indication of what *packages* you are using.)

cheers,

Rolf Turner

-- 
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-help mailing list