nse.hiruk: Hirukawa estimator

Description Usage Arguments Value Note Author(s) References Examples

View source: R/nse.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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 April 26, 2021, 1:06 a.m.

Related to nse.hiruk in nse...