cov_AR {slm} | R Documentation |
Covariance estimation by AR fitting
Description
Fit an autoregressive model to the process and compute the theoretical autocovariances of the fitted AR process.
By default, the order is chosen by using the AIC criterion (model_selec = -1
).
Usage
cov_AR(epsilon, model_selec = -1, plot = FALSE)
Arguments
epsilon |
numeric vector. An univariate process. |
model_selec |
integer or |
plot |
logical. By default, |
Value
The function returns the vector of the theoretical autocovariances of the AR process fitted on the process epsilon
.
model_selec |
the order selected. |
cov_st |
the vector of theoretical autocovariances of the fitted AR process. |
References
P.J. Brockwell and R.A. Davis (1991). Time Series: Theory and Methods. Springer Science & Business Media.
E. Caron, J. Dedecker and B. Michel (2019). Linear regression with stationary errors: the R package slm. arXiv preprint arXiv:1906.06583. https://arxiv.org/abs/1906.06583.
Examples
x = arima.sim(list(ar=c(0.4,0.2)),1000)
cov_AR(x, model_selec = 2, plot = TRUE)