F.type.test.statistic {acrt}R Documentation

Computation of F-type test statistics

Description

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).

Usage

F.type.test.statistic(y, R, r, X, bandwidth, ker, Eicker = FALSE, cores = 1)

Arguments

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 X.

R

The restriction matrix. F.type.test.statistic computes a test statistic for the hypothesis R β = r. R needs to be of full row rank, and needs to have the same number of columns as X.

r

The restriction vector. F.type.test.statistic computes a test statistic for the hypothesis R β = r. r needs to be a vector with the same number of coordinates as the number of rows of R.

X

The design matrix. X needs to be of full column rank. The number of columns of X must be smaller than the number of rows of X.

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. ker can take one of the values "Bartlett", "Parzen", or "Quadratic Spectral". The kweights function is used to generate the weights. For the test statistic T_{w} this implies the weights used via w(j, n) = ker(j/bandwidth). For the test statistic T_{E, \mathsf{W}} this implies the weights matrix \mathsf{W} via \mathsf{W}_{ij} = ker((i-j)/bandwidth), cf. Pötscher and Preinerstorfer (2016) for definitions of T_{w} and T_{E, \mathsf{W}}.

Eicker

Determines the test statistic computed. If Eicker = TRUE, then T_{E, \mathsf{W}} (with \mathsf{W}_{ij}=ker((i-j)/bandwidth)) is computed on the input observation vector(s) y. If Eicker = FALSE, then T_{w} (with w(j, n) = ker(j/bandwidth)) is computed on the input observation vector(s) y (cf. Pötscher and Preinerstorfer (2016) for a precise definition of these test statistics). Default is Eicker = FALSE.

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 y is a matrix with many columns. Parallelized computation is enabled only if the compiler used to build acrt supports OpenMP.

Details

For details concerning the test statistics please see the relevant sections in Pötscher and Preinerstorfer (2016) .

Value

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 y, or, if y is a vector, the test statistic evaluated at y.

References

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.

See Also

kweights.

Examples

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)

[Package acrt version 1.0.1 Index]