evaluate_shrinkage_curve.RdEvaluates the fitted posterior-mean shrinkage rule and posterior component probabilities over a grid of hypothetical observed coefficients at one detail level.
evaluate_shrinkage_curve(
fit,
level_index = 1L,
d_grid = seq(-4, 4, length.out = 401L)
)A fitted object returned by
wswavelet.
The position of the detail level in fit$detail,
beginning at 1. This is the position in the fitted list, not necessarily
the numerical wavelet level.
A numeric vector of hypothetical observed coefficient values at which the shrinkage rule is evaluated.
For each value in d_grid, the function recomputes the posterior for
the selected level using the fitted \(\pi_j\), \(\omega_j\),
\(\beta_j\), and likelihood. The resulting curve is the empirical-Bayes
version of the coefficientwise posterior-mean rule
$$
\delta_j(d)=p_{W,j}(d)\mu_{W,j}(d)
+p_{S,j}(d)\mu_{S,j}(d).
$$
The output can be used to plot attenuation, compare the rule with the
identity map \(\delta(d)=d\), or inspect how posterior evidence for the
spike changes with the observed coefficient.
A data frame with columns d, estimate,
posterior_spike, posterior_wendland, and
posterior_semicircle.
Sanyal, N. (2026). Resolution-Adaptive Compact-Support Priors for Bayesian Wavelet Denoising: A Wendland-Semicircle Slab Mixture for Low-SNR Signal Recovery. Axioms, 15(9), 678. <DOI:10.3390/axioms15090678>
# \donttest{
set.seed(1)
n <- 128
x <- seq(0, 1, length.out = n)
y <- sin(6 * pi * x) + rnorm(n, sd = 0.5)
fit <- wswavelet(
y, filter.number = 6L, quadrature_n = 24L
)
curve <- evaluate_shrinkage_curve(fit, level_index = 1L)
head(curve)
#> d estimate posterior_spike posterior_wendland posterior_semicircle
#> 1 -4.00 -0.3628569 0.03146277 4.721359e-07 0.9685368
#> 2 -3.98 -0.3620384 0.03257561 4.782257e-07 0.9674239
#> 3 -3.96 -0.3612032 0.03372514 4.843930e-07 0.9662744
#> 4 -3.94 -0.3603509 0.03491240 4.906382e-07 0.9650871
#> 5 -3.92 -0.3594811 0.03613848 4.969615e-07 0.9638610
#> 6 -3.90 -0.3585934 0.03740447 5.033633e-07 0.9625950
# }