| qdf_wavelet | R Documentation |
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.
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"),
...
)
u |
numeric vector of evaluation points in |
x |
numeric sample (sorted internally). |
j0 |
coarsest resolution level; the estimate uses |
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'). |
numeric vector of quantile density estimates at 'u'.
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.