View source: R/Simulations_functions.R
simu_IBSS_per_level | R Documentation |
Simulate data under the mixture normal prior
simu_IBSS_per_level(
lev_res = 7,
length_grid = 10,
pi0,
alpha = 0.8,
prop_decay = 0.1
)
lev_res |
numerical corresponds to the resolution of the simulated function (ideally between 3 and 10) |
length_grid |
vector numerical corresponds to the length of the grid of sigma for mixture component(cf ash) |
pi0 |
vector of length lev_res, contain digits between 0 and 1, which corresponds corresponds to the proportion of wavelet coefficients that are exactly 0 at a given level of resolution |
alpha |
numeric >0, control smoothness of the curves, should be positive and up 4, in particular, $d_sl ~ pi_0,sl delta_0 + sum_k pi_k N(0, 2^- alpha * s sigma_k^2)$ |
prop_decay |
numeric >0, control the proportion of non-zero wavelet coefficient per scale, $pi_0,sl = 1- exp(-prop_decay*s)$ |
out <- simu_IBSS_per_level(lev_res=9, alpha=1, prop_decay = 0.5)
plot(out$sim_func, type="l", ylab="y")
out$emp_pi0
temp_func <- simu_IBSS_per_level(lev_res=9, alpha=1, prop_decay = 0)
print( temp_func$emp_pi0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.