Automatic Bandwidth Selection
Automatic bandwidth selection of Andrews (1991) and of Newey and West (1994).
getBandwidth(u, bandwidth = c("and", "nw"), kernel, ..., check = TRUE) getBandwidthAnd(u, kernel = c("ba", "pa", "qs", "th", "tr"), check = TRUE) getBandwidthNW(u, kernel = c("ba", "pa", "qs"), inter = FALSE, u.weights = NULL, check = TRUE)
u |
[ |
bandwidth |
[ |
kernel |
[ |
... |
Arguments passed to |
check |
[ |
inter |
[ |
u.weights |
[ |
For Andrews (1991), the AR(1) individual version is implemented.
The kernel that is used for calculating the long-run variance can be one of the following:
"ba"
: Bartlett kernel
"pa"
: Parzen kernel
"qs"
: Quadratic Spectral kernel
"th"
: Tukey-Hanning kernel (only if bandwidth = "and"
)
"tr"
: Truncated kernel (only if bandwidth = "and"
)
[numeric(1)
]. Bandwidth
getBandwidthAnd
: Automatic bandwidth selection of Andrews (1991).
getBandwidthNW
: Automatic bandwidth selection of Newey and West (1994).
Andrews, D.W.K. (1991): "Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation," Econometrica, 59, 817–854, DOI:10.2307/2938229.
Newey, W.K. and K.D. West (1994): "Automatic Lag Selection in Covariance Matrix Estimation", Review of Economic Studies, 61, 631–653, DOI:10.2307/2297912.
set.seed(1909) x <- rnorm(100) getBandwidth(x, kernel = "ba") getBandwidth(x, bandwidth = "nw", kernel = "ba") x2 <- arima.sim(model = list(ar = c(0.7, 0.2)), innov = x, n = 100) getBandwidth(x2, kernel = "qs") getBandwidth(x2, bandwidth = "nw", kernel = "qs")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.