autoarmafit: Automatic ARMA Model Fitting

autoarmafitR Documentation

Automatic ARMA Model Fitting

Description

Provide an automatic ARMA model fitting procedure. Models with various orders are fitted and the best choice is determined with the aid of the statistics AIC.

Usage

  autoarmafit(y, max.order = NULL)

Arguments

y

a univariate time series.

max.order

upper limit of AR order and MA order. Default is 2 \sqrt{n}, where n is the length of the time series y.

Details

The maximum likelihood estimates of the coefficients of a scalar ARMA model

y(t) - a(1)y(t-1) -...- a(p)y(t-p) = u(t) - b(1)u(t-1) -...- b(q)u(t-q)

of a time series y(t) are obtained by using DAVIDON's variance algorithm. Where p is AR order, q is MA order and u(t) is a zero mean white noise. Pure autoregression is not allowed.

Value

best.model

the best choice of ARMA coefficients.

model

a list with components arcoef (Maximum likelihood estimates of AR coefficients), macoef (Maximum likelihood estimates of MA coefficients), arstd (AR standard deviation), mastd (MA standard deviation), v (Innovation variance), aic (AIC = n \log(det(v))+2(p+q)) and grad (Final gradient) in AIC increasing order.

References

H.Akaike, E.Arahata and T.Ozaki (1975) Computer Science Monograph, No.5, Timsac74, A Time Series Analysis and Control Program Package (1). The Institute of Statistical Mathematics.

Examples

# "arima.sim" is a function in "stats".
# Note that the sign of MA coefficient is opposite from that in "timsac".
y <- arima.sim(list(order=c(2,0,1),ar=c(0.64,-0.8),ma=-0.5), n = 1000)
autoarmafit(y)

timsac documentation built on Sept. 30, 2023, 5:06 p.m.