TSSS (version 1.2.3)

arfit: Univariate AR Model Fitting

Description

Fit a univariate AR model by Yule-Walker method, Least squares (Householder) method or 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)

plot

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

further arguments to be passed to plot.arfit.

Value

An object of class "arfit", which is a list with the following elements:

sigma2

innovation variance.

maice.order

order of minimum AIC.

aic

AIC.

arcoef

AR coefficients of the best model.

parcor

PARCOR.

spec

power spectrum (in log scale).

tsname

the name of the univariate time series y.

References

Kitagawa, G. (2010) Introduction to Time Series Modeling. Chapman & Hall/CRC.

Examples

Run this code
# NOT RUN {
# Sun spot number data
data(Sunspot)
arfit(log10(Sunspot), 20)

# BLSALLFOOD data
data(BLSALLFOOD)
arfit(BLSALLFOOD)
# }

Run the code above in your browser using DataCamp Workspace