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 | ||||||||||
method |
estimation procedure.
| ||||||||||
plot |
logical. If | ||||||||||
... |
graphical arguments passed to the |
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 |
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)