qdf_wavelet: Wavelet estimators of the quantile density

View source: R/wavelet.R

qdf_waveletR Documentation

Wavelet estimators of the quantile density

Description

Projection estimators of q(u) on a wavelet basis of [0,1] (Chesneau, Dewan and Doosti 2016; Shirazi and Doosti 2022). The scaling coefficients are estimated by the warped-basis formula

\hat c_{j_0,k} = \int \phi_{j_0,k}(\hat F(x))\,dx = \sum_{i=1}^{n-1} (X_{(i+1)} - X_{(i)})\,\phi_{j_0,k}(i/n),

which is exact for the empirical distribution function \hat F ('integration = "exact"'); '"simpson"' reproduces the composite Simpson rule of the original MATLAB implementation.

Three estimators are available through 'threshold': * '"none"': the linear estimator \hat g_L = \sum_k \hat c_{j_0,k}\phi_{j_0,k}; * '"hard"': term-by-term hard thresholding of a 'levels'-level periodic DWT of the coefficient vector; * ‘"block"': Cai’s BlockJS block thresholding (Shirazi and Doosti 2022).

With 'smooth = TRUE' the estimate is post-smoothed by the local-linear smoother of Ramirez and Vidakovic (2010) with bandwidth 'h'; this "smoothed" version was the best performer in both papers' simulations.

Usage

qdf_wavelet(
  u,
  x,
  j0 = 5L,
  h = 0.15,
  threshold = c("none", "hard", "block"),
  smooth = TRUE,
  filter = "db3",
  dwt_filter = "coif1",
  levels = 3L,
  integration = c("exact", "simpson"),
  ...
)

Arguments

u

numeric vector of evaluation points in [0, 1].

x

numeric sample (sorted internally).

j0

coarsest resolution level; the estimate uses 2^{j_0} scaling coefficients. Default 5.

h

bandwidth of the local-linear post-smoother on the probability scale (default 0.15); ignored when 'smooth = FALSE'.

threshold

'"none"', '"hard"' or '"block"'.

smooth

logical; apply local-linear smoothing.

filter

scaling filter for the basis; see [wavelet_filter()]. Default '"db3"'.

dwt_filter

filter for the secondary DWT used in thresholding (default '"coif1"').

levels

number of DWT levels for thresholding (default 3).

integration

'"exact"' or '"simpson"'.

...

passed to [threshold_coefficients()] ('const', 'block_length', 'rule').

Value

numeric vector of quantile density estimates at 'u'.

References

Chesneau, C., Dewan, I. and Doosti, H. (2016). Nonparametric estimation of a quantile density function by wavelet methods. *Computational Statistics & Data Analysis*, 94, 161–174.

Shirazi, E. and Doosti, H. (2022). Nonparametric estimation of a quantile density function under L_p risk via block thresholding method. *Communications in Statistics – Simulation and Computation*, 51, 539–553.

Ramirez, P. and Vidakovic, B. (2010). Wavelet density estimation for stratified size-biased sample. *Journal of Statistical Planning and Inference*, 140, 419–432.

Examples

set.seed(1)
x <- rbeta(500, 0.5, 0.5)
u <- seq(0.02, 0.98, by = 0.02)
q_true <- 1 / dbeta(qbeta(u, 0.5, 0.5), 0.5, 0.5)
q_lin  <- qdf_wavelet(u, x, j0 = 5, smooth = FALSE)
q_blk  <- qdf_wavelet(u, x, j0 = 5, threshold = "block", smooth = TRUE)
plot(u, q_true, type = "l"); lines(u, q_lin, col = 2); lines(u, q_blk, col = 4)

qdfauction documentation built on Nov. 10, 2026, 5:07 p.m.