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

Description Usage Arguments Details Value See Also Examples

Description

Find the best model from a range of possible ARMA models

Usage

1
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

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.

Value

Returns an ARMA model consisting of a list with the following components.

phi

Vector of AR coefficients (index number equals coefficient subscript)

theta

Vector of MA coefficients (index number equals coefficient subscript)

sigma2

White noise variance

aicc

Akaike information criterion corrected

se.phi

Standard errors for the AR coefficients

se.theta

Standard errors for the MA coefficients

See Also

arma

Examples

1
2
3
4
xv = c("diff",1)
e = Resid(dowj,xv)
a = autofit(e)
print(a)


Search within the itsmr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.