R/Simulations_functions.R
simu_IBSS_ash_vanilla.Rd
Simulate data under a simple mixture normal prior
simu_IBSS_ash_vanilla(lev_res = 7, length_grid = 10, pi0 = 0.85)
numeric, corresponds to the resolution of the simulated function (ideally between 3 and 10)
vector, numerical corresponds to the length of the grid of sigma for mixture component (cf ashr package)
numeric, contains a digit between 0 and 1, which corresponds to the proportion of wavelet coefficients that are exactly 0
out <- simu_IBSS_ash_vanilla(lev_res=8, length_grid= 10, pi0= 0.85)
plot(out$sim_func, type="l", ylab="y")
out$emp_pi0
#> [1] 0.8242188