I am really new with R and time series. But, I have understood most concept. Part where I am (very) confused is the xreg=
argument in arima()
from tseries package and forecast package. As I have read most of the related threads on this site, I understand that xreg
is used for exogenous data. See for example, How to fit an ARIMAX-model with R?.
Thus, I conclude that I can fit SARIMAX or ARMAX method using arima()
. However, I am currently reading Shumwhay's book and his web tutorial.
If you check the website (close to the bottom of the page), you can found that he said
xreg
inarima()
does not fix ARMAX model.
It is also explained in the R issues on his website. In addition, he proposed fitting ARMAX model in state space model. So, the answers found on this site and the explanation in the website are completely different.
Can anyone explain me why there is such discrepancy? Which one is correct?
If Shumwhay is correct, is there any function/package that can fit ARMAX or SARIMAX model in R?
Sorry if it turns out I only missed some points, but I hope you can point me to the right direction.