Sample a smooth random function from the IBSS wavelet prior
Source:R/simulation.R
mf_simu_ibss_per_level.RdDraws a length-2^lev_res function whose wavelet detail
coefficients at scale s are independent draws from an
ash-style normal mixture
\sum_k \pi_{s,k} N(0, (\sigma_k / 2^{\alpha s})^2).
The first mixture component is a point mass at zero with
weight pi0[s]; the remaining components share a common
grid of standard deviations on (0, \infty). The inverse
DWT (wavethresh::wr) maps the sampled coefficient vector
to position space.
Arguments
- lev_res
integer
>= 2. Resolution level: the sampled function lives on a length-2^lev_resgrid. Default7(length 128).- length_grid
integer
>= 2. Number of components in the per-scale ash mixture, including the null component at zero. Default10.- pi0
optional numeric vector of length
lev_res. Per-scale null-component weight. When omitted, defaults to1 - exp(-prop_decay * 1:lev_res).- alpha
non-negative numeric. Scale-dependent variance shrinkage exponent: at scale
s, the per-component sd is divided by2^{alpha * s}. Largeralphaproduces smoother functions. Default0.8.- prop_decay
numeric in
[0, 1]. Controls how the defaultpi0decays across scales: largerprop_decaygives a sparser fine-scale signal. Ignored whenpi0is supplied explicitly. Default0.1.
Value
A list with components
sim_funcnumeric vector of length
2^lev_res, the position-space sample.true_coefnumeric vector of the wavelet detail coefficients used to construct the sample.
mix_per_scalelength-
lev_reslist ofashr::normalmixobjects, one per wavelet scale.emp_pi0length-
lev_resnumeric vector of empirical null-component fractions per scale (the fraction of detail coefficients that came back exactly zero from the mixture sampler).
