Learn R Programming

itsmr (version 1.1)

autofit: Find the best model from a range of possible ARMA models

Description

Find the best model from a range of possible ARMA models

Usage

autofit(x, p = 0:5, q = 0:5)

Arguments

x
Data vector (typically residuals from Resid)
p
Range of AR orders
q
Range of MA orders

Value

  • Returns an ARMA model consisting of a list with the following components.
  • phiAR coefficients
  • thetaMA coefficients
  • sigma2White noise variance
  • aiccAkaike information criterion corrected
  • se.phiStandard errors for the AR coefficients
  • se.thetaStandard errors for the MA coefficients

Details

Tries all combinations of p and q and returns the model with the lowest AICC. The arguments p and q should be small ranges as this function can be slow otherwise. The innovations algorithm is used to estimate white noise variance.

See Also

arma

Examples

Run this code
xv = c("diff",1)
e = Resid(dowj,xv)
a = autofit(e)
print(a)

Run the code above in your browser using DataLab