Description Usage Arguments Details Value References Examples
Calculate the variance of the mean with the kernel based variance estimator by Andrews (1991) using Hirukawa (2010) automatic bandwidth estimator.
1 |
x |
A numeric vector. |
prewhite |
A bool indicating if the time-serie will be prewhitened before analysis. |
type |
The type of kernel used c("Bartlett","Parzen"). |
This is a wrapper around lrvar from the sandwich package and use Hirukawa (2010) automatic bandwidth estimator.
The variance estimator.
Zeileis, Achim. "Econometric computing with HC and HAC covariance matrix estimators." (2004).
Andrews, Donald WK. "Heteroskedasticity and autocorrelation consistent covariance matrix estimation." Econometrica: Journal of the Econometric Society 59.03 (1991): 817-858.
Hirukawa, Masayuki. "A two-stage plug-in bandwidth selection and its implementation for covariance estimation." Econometric Theory 26.03 (2010): 710-743.
1 2 3 4 5 6 7 8 9 10 11 12 | n = 1000
ar = c(0.9)
mean = c(1)
sd = c(10)
Ts1 = as.vector(arima.sim(n = n, list(ar = ar), sd = sd) + mean)
nse::nse.hiruk(x = Ts1, type = "Bartlett")
nse::nse.hiruk(x = Ts1, prewhite = TRUE, type = "Bartlett")
nse::nse.hiruk(x = Ts1, type = "Parzen")
nse::nse.hiruk(x = Ts1, prewhite = TRUE, type = "Parzen")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.