3
$\begingroup$

I am looking for some tools for automatic fitting of moving average (MA) time series model to my data in R. I know R:stats::ar method to fit an autoregressive time series model to the data (by default selecting the complexity by AIC) but I keep failing in finding its equivalent for MA model.

There is armaFit method but it requires pre-defining an order of the MA model. I would like to have something that would do it automatically.

$\endgroup$
  • $\begingroup$ Maybe look at auto.arima in the 'forecast' package? $\endgroup$ – thebigdog Apr 30 '14 at 7:10
3
$\begingroup$

Assuming x is your time series:

library(forecast)
fitma <- auto.arima(x, max.p=0, stationary=TRUE, seasonal=FALSE)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.