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 |
bandwidth |
A positive numeric value representing the kernel bandwidth smoothing parameter.
If |
kernel |
A character string specifying the smoothing kernel to use:
|
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
-
\hat{f}_{h}(x) = \frac{1}{n \cdot h} \sum_{i=1}^{n} K\left(\frac{x - X_i}{h}\right)
, -
h
is the bandwidth, -
n
is the sample size.
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
Examples
# Example usage of qVar function
data <- rnorm(100)
qVar(data, 0.5)