Description Usage Arguments Details Value Author(s) References See Also Examples
Estimate parameters φ of autoregressive time series model
X_t = ∑_{i=1}^pφ_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 functions sync_test
and wavk_test
.
1 |
x |
a vector containing a univariate time series. Missing values are not allowed. |
ar.order |
order of autoregressive model when |
ar.method |
method of estimating autoregression coefficients.
Default |
BIC |
logical value indicates whether the order of autoregressive
filter should be selected by Bayesian information criterion (BIC).
If |
The same formula for BIC is used consistently for all methods:
BIC=n\ln(\hat{σ}^2) + k\ln(n),
where n = length(x)
, k=p+1.
A vector of estimated AR coefficients. Returns numeric(0)
if
the final p=0.
Vyacheslav Lyubchich
1 2 3 4 5 6 7 8 9 10 11 12 | # Fix seed for reproducible simulations:
set.seed(1)
#Simulate some time series, possibly with trend:
n <- 100
Y <- arima.sim(n = n, 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.