ARest | R Documentation |
Estimate parameters \phi
of autoregressive time series model
X_t = \sum_{i=1}^p\phi_iX_{t-i} + e_t,
by default using robust difference-based estimator and Bayesian information
criterion (BIC) to select the order p
. This function is employed
for time series filtering in the functions notrend_test
, sync_test
,
and wavk_test
.
ARest(x, ar.order = NULL, ar.method = "HVK", ic = c("BIC", "AIC", "none"))
x |
a vector containing a univariate time series. Missing values are not allowed. |
ar.order |
order of the autoregressive model when |
ar.method |
method of estimating autoregression coefficients.
Default |
ic |
information criterion used to select the order of autoregressive filter (AIC of BIC),
considering models of orders |
The formula for information criteria used consistently for all methods:
IC=n\ln(\hat{\sigma}^2) + (p + 1)k,
where n
= length(x)
,
p
is the autoregressive order (p + 1
is the number of model parameters),
and k
is the penalty (k = \ln(n)
in BIC, and k = 2
in AIC).
A vector of estimated AR coefficients. Returns numeric(0)
if
the final p=0
.
Vyacheslav Lyubchich
ar
, HVK
,
notrend_test
, sync_test
, wavk_test
# Simulate a time series Y:
Y <- arima.sim(n = 200, list(order = c(2, 0, 0), ar = c(-0.7, -0.1)))
plot.ts(Y)
# Estimate the coefficients:
ARest(Y) # HVK, by default
ARest(Y, ar.method = "yw") # Yule--Walker
ARest(Y, ar.method = "burg") # Burg
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.