nse.hiruk: Hirukawa estimator

View source: R/nse.R

nse.hirukR Documentation

Hirukawa estimator

Description

Function which calculates the numerical standard error with the kernel based variance estimator by Andrews (1991) using Hirukawa (2010) automatic bandwidth estimator.

Usage

nse.hiruk(x, type = c("bartlett", "parzen"), lag.prewhite = 0)

Arguments

x

A numeric vector.

type

The type of kernel used among "bartlett" and "parzen". Default is type = "Bartlett".

lag.prewhite

Prewhite the series before analysis (integer or NULL). When lag.prewhite = NULL this performs automatic lag selection. Default is lag.prewhite = 0 that is no prewhitening.

Value

The NSE estimator.

Note

nse.hiruk is a wrapper around lrvar from the sandwich package and uses Hirukawa (2010) bandwidth estimator. See the documentation of sandwich for details.

Author(s)

David Ardia and Keven Bluteau

References

Hirukawa, M. (2010). A two-stage plug-in bandwidth selection and its implementation for covariance estimation. Econometric Theory 26(3), 710-743.

Examples

## 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)

nse documentation built on Nov. 10, 2022, 5:52 p.m.