Learn R Programming

funtimes (version 5.0)

ARest: Estimation of Autoregressive (AR) Parameters

Description

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 mainly employed for time series filtering in functions sync.test and wavk.test.

Usage

ARest(x, ar.order = NULL, ar.method = "HVK", BIC = TRUE)

Arguments

x

a time series vector.

ar.order

order of autoregressive model when BIC = FALSE, or the maximal order for BIC-based filtering. Default is round(10*log10(length(x))).

ar.method

method of estimating autoregression coefficients. Default "HVK" delivers robust difference-based estimates by Hall and Van Keilegom (2003). Alternatively, options of ar function can be used, such as "burg", "ols", "mle", and "yw".

BIC

logical value indicates whether the order of autoregressive filter should be selected by Bayesian information criterion (BIC). If TRUE (default), models of orders \(p=\) 0,1,...,ar.order or \(p=\) 0,1,...,round(10*log10(length(x))) are considered, depending on whether ar.order is defined or not.

Value

A vector of estimated AR coefficients. Returns numeric(0) if the final \(p=0\).

Details

The same formula for BIC is used consistently for all methods: $$BIC=n\ln(\hat{\sigma}^2) + k\ln(n),$$ where \(n\) = length(x), \(k=p+1\).

References

Hall, P. and Van Keilegom, I. (2003). Using difference-based methods for inference in nonparametric regression with time series errors. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 65: 443--456. DOI: 10.1111/1467-9868.00395

See Also

ar, HVK, sync.test, wavk.test

Examples

Run this code
# NOT RUN {
# 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
# }

Run the code above in your browser using DataLab