nse.hiruk | R Documentation |
Function which calculates the numerical standard error with the kernel based variance estimator by Andrews (1991) using Hirukawa (2010) automatic bandwidth estimator.
nse.hiruk(x, type = c("bartlett", "parzen"), lag.prewhite = 0)
x |
A numeric vector. |
type |
The type of kernel used among |
lag.prewhite |
Prewhite the series before analysis (integer or |
The NSE estimator.
nse.hiruk
is a wrapper around lrvar
from
the sandwich
package and uses Hirukawa (2010) bandwidth estimator.
See the documentation of sandwich
for details.
David Ardia and Keven Bluteau
Hirukawa, M. (2010). A two-stage plug-in bandwidth selection and its implementation for covariance estimation. Econometric Theory 26(3), 710-743.
## Not run: n = 1000 ar = 0.9 mean = 1 sd = 1 set.seed(1234) x = c(arima.sim(n = n, list(ar = ar), sd = sd) + mean) nse.hiruk(x = x, type = "parzen", lag.prewhite = 0) nse.hiruk(x = x, type = "bartlett", lag.prewhite = NULL) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.