Computes the \(\hat{qLL}\) statistic of Elliott and Muller (2006) for testing the null hypothesis that regression coefficients are constant over time against the alternative of general time variation.
Arguments
- y
Numeric vector of length
T; the dependent variable.- X
A
T x kmatrix of regressors linked to potentially time-varying coefficients.- Z
A
T x dmatrix of regressors with constant coefficients. UseNULL(default) if all coefficients may vary.- L
Integer; lag truncation for the Newey-West estimator of the variance. Default
0(no correction).
Value
A list with class "qll_hat" containing:
- statistic
The \(\hat{qLL}\) test statistic.
- k
Number of potentially time-varying coefficients.
- n
Number of observations.
Details
The test is based on optimal invariant statistics for the null of
constant coefficients against local alternatives. The \(\hat{qLL}\)
statistic has non-standard critical values that depend on k;
see Table 1 in Elliott and Muller (2006).
Selected critical values (5\
k = 1: -5.91k = 2: -10.64k = 3: -15.78k = 4: -20.62k = 5: -25.87
Reject the null when \(\hat{qLL}\) is below the critical value.
References
Elliott, G. and Muller, U.K. (2006). Efficient Tests for General Persistent Time Variation in Regression Coefficients. Review of Economic Studies, 73(4), 907-940.
Examples
set.seed(42)
n <- 200
x <- matrix(rnorm(n * 2), n, 2)
y <- x %*% c(0.5, -0.3) + rnorm(n)
qll_hat(y, x)
#>
#> ╭────────────────────────────────────────────────────╮
#> │ Elliott-Muller Test for Time-Varying Coefficients │
#> │ (Elliott and Muller, 2006) │
#> ├────────────────────────────────────────────────────┤
#> │ H0: Constant coefficients (beta(t) = beta) │
#> │ H1: Time-varying coefficients │
#> ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┤
#> │ Test Results: │
#> │ qLL-hat statistic: -13.8782 │
#> │ 5% critical value: -10.64 │
#> │ Decision (5%): Rejected *** │
#> ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┤
#> │ Details: │
#> │ Observations (T): 200 │
#> │ Time-varying coefficients (k): 2 │
#> │ Note: Non-standard distribution. │
#> │ Reject when qLL-hat < critical value. │
#> ╰────────────────────────────────────────────────────╯
#>
