Description Usage Arguments Details Value Functions References See Also Examples
Automatic bandwidth selection of Andrews (1991) and of Newey and West (1994).
1 2 3 4 5 6 |
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.
1 2 3 4 5 6 7 8 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.