ws_numerical_checks.RdRuns a standard collection of numerical checks for endpoint handling, symmetry, support bounds, finiteness, and Gaussian monotonicity of the posterior-mean shrinkage rule.
ws_numerical_checks(quadrature_n = 128L)The routine evaluates Gaussian and Laplace posterior means over a fixed
coefficient grid for all combinations of spike probability
\(\pi\in\{0,0.5,1\}\) and Wendland weight
\(\omega\in\{0,0.5,1\}\). It checks the numerical versions of
$$\delta(-d)=-\delta(d)$$
and $$|\delta(d)|\leq\beta$$.
For the Gaussian likelihood, min_first_difference checks the
expected nondecreasing behavior on the grid. The endpoint columns verify
the exact no-spike and all-spike rules.
A data frame with one row for each likelihood, spike probability, and slab
weight combination. Important columns are max_oddness_error,
min_first_difference, max_support_excess,
all_finite, pi0_exact_slab, and pi1_exact_zero.
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{
checks <- ws_numerical_checks(quadrature_n = 48L)
checks
#> likelihood pi omega max_oddness_error min_first_difference
#> 1 gaussian 0.0 0.0 1.021405e-14 9.141978e-04
#> 2 laplace 0.0 0.0 3.108624e-15 -2.220446e-15
#> 3 gaussian 0.5 0.0 1.021405e-14 9.142390e-04
#> 4 laplace 0.5 0.0 1.554312e-15 -1.776357e-15
#> 5 gaussian 1.0 0.0 0.000000e+00 0.000000e+00
#> 6 laplace 1.0 0.0 0.000000e+00 0.000000e+00
#> 7 gaussian 0.0 0.5 1.021405e-14 9.743291e-04
#> 8 laplace 0.0 0.5 2.746692e-13 -1.776357e-15
#> 9 gaussian 0.5 0.5 1.021405e-14 9.744105e-04
#> 10 laplace 0.5 0.5 1.736389e-13 -1.221245e-15
#> 11 gaussian 1.0 0.5 0.000000e+00 0.000000e+00
#> 12 laplace 1.0 0.5 0.000000e+00 0.000000e+00
#> 13 gaussian 0.0 1.0 6.661338e-15 2.177574e-03
#> 14 laplace 0.0 1.0 7.304157e-13 -3.330669e-16
#> 15 gaussian 0.5 1.0 6.661338e-15 2.180499e-03
#> 16 laplace 0.5 1.0 4.086731e-13 -2.220446e-16
#> 17 gaussian 1.0 1.0 0.000000e+00 0.000000e+00
#> 18 laplace 1.0 1.0 0.000000e+00 0.000000e+00
#> max_support_excess all_finite pi0_exact_slab pi1_exact_zero
#> 1 0 TRUE TRUE NA
#> 2 0 TRUE TRUE NA
#> 3 0 TRUE NA NA
#> 4 0 TRUE NA NA
#> 5 0 TRUE NA TRUE
#> 6 0 TRUE NA TRUE
#> 7 0 TRUE TRUE NA
#> 8 0 TRUE TRUE NA
#> 9 0 TRUE NA NA
#> 10 0 TRUE NA NA
#> 11 0 TRUE NA TRUE
#> 12 0 TRUE NA TRUE
#> 13 0 TRUE TRUE NA
#> 14 0 TRUE TRUE NA
#> 15 0 TRUE NA NA
#> 16 0 TRUE NA NA
#> 17 0 TRUE NA TRUE
#> 18 0 TRUE NA TRUE
# }