arfit {TSSS}R Documentation

Univariate AR Model Fitting

Description

Fit a univariate AR model by the Yule-Walker method, the least squares (Householder) method or the PARCOR method.

Usage

arfit(y, lag = NULL, method = 1, plot = TRUE, ...)

Arguments

y

a univariate time series.

lag

highest order of AR model. Default is 2 \sqrt{n}, where n is the length of the time series y.

method

estimation procedure.

1 : Yule-Walker method
2 : Least squares (Householder) method
3 : PARCOR method (Partial autoregression)
4 : PARCOR method (PARCOR)
5 : PARCOR method (Burg's algorithm)
plot

logical. If TRUE (default), PARCOR, AIC and power spectrum are plotted.

...

graphical arguments passed to the plot method.

Value

An object of class "arfit" which has a plot method. This is a list with the following components:

sigma2

innovation variance.

maice.order

order of minimum AIC.

aic

AICs of the estimated AR models.

arcoef

AR coefficients of the estimated AR models.

parcor

PARCOR.

spec

power spectrum (in log scale) of the AIC best AR model.

tsname

the name of the univariate time series y.

References

Kitagawa, G. (2020) Introduction to Time Series Modeling with Applications in R. Chapman & Hall/CRC.

Examples

# Sunspot number data
data(Sunspot)
arfit(log10(Sunspot), lag = 20, method = 1)

# BLSALLFOOD data
data(BLSALLFOOD)
arfit(BLSALLFOOD)

[Package TSSS version 1.3.4-5 Index]