robjhyndman / forecast

Forecasting Functions for Time Series and Linear Models
http://pkg.robjhyndman.com/forecast
1.11k stars 341 forks source link

Auto.arima with xreg #865

Closed azev77 closed 3 years ago

azev77 commented 3 years ago

Suppose I want to estimate an AR1 w/ an x variable: y_t = \mu + \rho * y_t-1 + \beta * x_t + \epsilon_t how is this possible w/ auto.arima()?

It appears from the example in fpp2 that auto.arima(y, xreg=x) only fits regression models w/ ARIMA errors

robjhyndman commented 3 years ago

You can reparameterize that model to be a linear regression with AR(1) errors. See https://robjhyndman.com/hyndsight/arimax/ Note: this is not a Q&A site. It is intended to report bugs or request features for the forecast package. Please ask such questions on crossvalidated.com or stackoverflow.com