qVar {boodd}R Documentation

Estimating Variance of a Quantile

Description

This function calculates the quantile variance using kernel density estimation.

Usage

qVar(
  x,
  alpha,
  bandwidth = NULL,
  kernel = c("gaussian", "epanecbandwidthikov", "rectangular")
)

Arguments

x

A numeric vector.

alpha

A numeric value from the interval [0,1] or a vector of probabilities.

bandwidth

A positive numeric value representing the kernel bandwidth smoothing parameter. If NULL, bandwidth is estimated using unbiased cross-validation method.

kernel

A character string specifying the smoothing kernel to use: "gaussian", "epanechnikov", or "rectangular".

Details

If qa is the quantile of order alpha, the quantile variance v is given by:

v = \frac{\alpha(1 - \alpha)}{\hat{f}_{h}(qa)^2}

where

Value

A numeric vector containing the quantile variances.

References

Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted..

Maritz, J. S. and Jarrett, R. G. (1978). A note on estimating the variance of the sample median. Journal of the American Statistical Association, 73, 194-196.

See Also

boots, confint.

Examples

# Example usage of qVar function
data <- rnorm(100)
qVar(data, 0.5)


[Package boodd version 0.1 Index]