teststat {robcp}R Documentation

Test statistic for the Huberized CUSUM Test

Description

Computes the test statistic for a structural break test called 'Huberized CUSUM Test'.

Usage

teststat(y, fun = "HLm", b_n, k, constant)

Arguments

y

vector or matrix with each column representing a time series (numeric).

fun

character string specifiyng the transformation function ψ.

b_n

for sigma2.

k

numeric bound used in psi.

constant

scale factor of the MAD. Default is 1.4826.

Details

y is transformed by fun. Let x be the resulting vector or matrix and n be the length of a time series.

In case of a vector the test statistic can be written as

max_{k = 1, ..., n}\frac{1}{√{n} σ}|∑_{i = 1}^{k} x_i - (k / n) ∑_{i = 1}^n x_i|,

where σ is the square root of sigma2.

In case of a matrix the test statistic follows as

max_{k = 1, ..., n}\frac{1}{n}(∑_{i = 1}^{k} X_i - \frac{k}{n} ∑_{i = 1}^{n} X_i)^T Σ^{-1} (∑_{i = 1}^{k} X_i - \frac{k}{n} ∑_{i = 1}^{n} X_i),

where X_i denotes the ith row of x and Σ^{-1} is the inverse of sigma2.

Value

test statistic (numeric value).

Author(s)

Sheila Görz

See Also

h_cumsum, psi

Examples

# time series with structural break at t = 20
ts <- c(rnorm(20, 0), rnorm(20, 2))

teststat(ts)

[Package robcp version 0.2.4 Index]