asymvar.acfextra: Calculation of the Long Run Variance Based on an AR Fit

Description Usage Arguments Details Value See Also Examples

Description

Computes the long run variance, which is required for change point testing, by first fitting an AR-model and then extrapolating its theoretic autocovariance function.

Usage

1
2
asymvar.acfextra(x, obs = c("untransformed", "ranks"), order.max = 2,
                 aic = FALSE)

Arguments

x

numeric vector or univariate time series object.

obs

character string indicating whether the long run variance of a cusum statistic ("untransformed") or of a Wilcoxon statistic ("ranks") is calculated.

aic

logical indicating whether the AR order should be estimated by robust AIC criteria considering orders up to order.max (if aic = TRUE) or should be equal to order.max (if aic = FALSE).

order.max

integer value determining the (maximal) order of the AR fit.

Details

Cusum-type change point tests require an estimation of the long run variance. One possibility is to fit an AR model and calculate its corresponding autocovariance function. The long run variance is then estimated by the Bartlett estimator with bandwidth n-1.

Value

List containing the following named elements:

lrv

estimated long run variance

order

estimated order of the AR model

See Also

The long run variance can be also estimated by asymvar.window and asymvar.acf.

Examples

1
2
3
set.seed(1066)
tss <- arima.sim(model = list(ar = 0.3, ma = 0.5), n = 100)
asymvar.acfextra(tss)

robts documentation built on May 2, 2019, 4:55 p.m.