F.type.test.statistic {acrt} | R Documentation |
This function computes test statistics of the form
T_w and T_{E, \mathsf{W}}
as defined in Pötscher and Preinerstorfer (2016). The weights
for T_w and for T_{E, \mathsf{W}} are obtained from a kernel
function
(Bartlett, Parzen, or Quadratic Spectral kernel, which provide nonnegative
definite covariance
estimators) and a bandwidth parameter. See also the description of the argument
ker
below for further details concerning the weights. The class of
test statistics of the form T_w or T_{E, \mathsf{W}}
includes F-type tests based on covariance estimators with data-independent
bandwidth parameters and without prewhitening as considered in, e.g.,
Newey and West (1987), Andrews (1991), Kiefer and Vogelsang (2002, 2005), cf.
also Preinerstorfer and Pötscher (2016).
F.type.test.statistic(y, R, r, X, bandwidth, ker, Eicker = FALSE, cores = 1)
y |
Either an observation vector, or a matrix the columns of which are
observation vectors. The
number of rows of an observation vector must coincide with the number of rows
of the design matrix |
R |
The restriction matrix. |
r |
The restriction vector. |
X |
The design matrix. |
bandwidth |
Bandwidth parameter used in the construction of the test statistic. A positive real number. |
ker |
Kernel function used in the construction of the test statistic.
|
Eicker |
Determines the test statistic computed. If |
cores |
The number of CPU cores used in the (parallelized)
computation of the test statistics. Default is 1. This can be used to speed up
the computation in case |
For details concerning the test statistics please see the relevant sections in Pötscher and Preinerstorfer (2016) .
The function returns a list consisting of:
test.val |
Either a vector the entries of which correspond to the values
of the
test statistic evaluated at each column of the input matrix |
Andrews, D. W. K. (1991). Heteroskedasticity and autocorrelation consistent covariance matrix estimation. Econometrica, 59 817-858.
Kiefer, N. M. and Vogelsang, T. J. (2002). Heteroskedasticity - autocorrelation robust standard errors using the Bartlett kernel without truncation. Econometrica, 70 2093-2095.
Kiefer, N. M. and Vogelsang, T. J. (2005). A new asymptotic theory for heteroskedasticity - autocorrelation robust tests. Econometric Theory, 21 1130-1164.
Newey, W. K. and West, K. D. (1987). A simple, positive semi-definite, heteroskedasticity and autocorrelation consistent covariance matrix. Econometrica, 55 703-708.
Pötscher, B.M. and Preinerstorfer, D. (2016). Controlling the size of autocorrelation robust tests. https://arxiv.org/abs/1612.06127/
Preinerstorfer, D. and Pötscher, B. M. (2016). On size and power of heteroskedasticity and autocorrelation robust tests. Econometric Theory, 32 261-358.
n <- 100 y <- rnorm(n) X <- cbind(rep(1, length = n), rnorm(n)) R <- matrix(c(0, 1), nrow = 1, ncol = 2) r <- 0 bandwidth <- n/10 ker <- "Bartlett" F.type.test.statistic(y, R, r, X, bandwidth, ker)