Implemented as option simple
to "estimate" prior variance, I simply set the effect zero if all logBF are smaller than zero. It helps removing false discoveries as shown in this notebook.
The example was identified from a DSC benchmark.
attach(readRDS('issue_12.rds'))
m_init = mvsusieR::create_mash_prior(mixture_prior = mixture_prior, null_weight=null_weight, max_mixture_len=-1)
r1 = mvsusieR::mvsusie(X, Y, L=L, prior_variance=m_init, residual_variance=resid_Y, compute_objective=F, estimate_residual_variance=F)
susieR::susie_plot(r1,y='PIP', main = 'Default run not estimating prior', xlab = 'SNP positions', add_legend = T, b=true_pos)
Although the first effect captures the true signal, the additional false effects have non-trivial PIP.
Now using the simple
method setting prior variance to zero, if logBF for every variable is negative:
r2 = mvsusieR::mvsusie(X, Y, L=L, prior_variance=m_init, residual_variance=resid_Y, compute_objective=F, estimate_residual_variance=F, estimate_prior_variance=T, estimate_prior_method='simple')
susieR::susie_plot(r2,y='PIP', main = 'Default run estimating prior (filtering by logBF)', xlab = 'SNP positions', add_legend = T, b=true_pos)
Same SNP was captured for the first effect but the result is much cleaner.
r2$V
The original logBF:
r1$lbf
r2$lbf
Here I temporarily print lbf for each multivariate computation, for one iteration:
devtools::load_all("~/GIT/software/mvsusieR")
r3 = mvsusie(X, Y, L=L, prior_variance=m_init, residual_variance=resid_Y, compute_objective=F, estimate_residual_variance=F, max_iter=1)
As shown above, apart from the first effect that captures the true signal the other effects have negative yet different lbf
that clearly can result in false signals.