Description Usage Arguments Details Value References See Also Examples
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).
1 | 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.
1 2 3 4 5 6 7 8 |
###############################################################################
# Package acrt - Version 1.0.1 - License: GPL-2
###############################################################################
# acrt is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. A copy may be obtained at
# http://www.r-project.org/Licenses/
###############################################################################
$test.val
[1] 0.8824823
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.