Skip to contents

Regresses the squared (demeaned) series on a constant and its own q lags and forms \(LM = m R^2\) with \(m = n - q\), asymptotically \(\chi^2_q\) under the null of no ARCH. Rejection says the variance is predictable from its own past while the level may stay serially uncorrelated – a KS normality check cannot detect this at all, which is what the Python placeholder this mirrors replaced.

Usage

morie_arch_lm_test(r, q = 1L, demean = TRUE)

Arguments

r

Numeric series (returns or residuals).

q

Lags in the auxiliary regression.

demean

Subtract the sample mean before squaring.

Value

Named list with statistic, p_value, df, r2, n, q, method.

Details

Mirrors morie.fn.volengle.

References

Engle, R. F. (1982). Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation. Econometrica, 50(4), 987-1007. Sec. 8.

Examples

set.seed(1)
morie_arch_lm_test(rnorm(200), q = 2)$p_value
#> [1] 0.2566383