simu_IBSS_per_level: Simulate data under the mixture normal prior

View source: R/Simulations_functions.R

simu_IBSS_per_levelR Documentation

Simulate data under the mixture normal prior

Description

Simulate data under the mixture normal prior

Usage

simu_IBSS_per_level(
  lev_res = 7,
  length_grid = 10,
  pi0,
  alpha = 0.8,
  prop_decay = 0.1
)

Arguments

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)$

Examples

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)


stephenslab/susiF.alpha documentation built on March 1, 2025, 4:28 p.m.