pcarbo / varbvs

Large-scale Bayesian variable selection for R and MATLAB.
http://pcarbo.github.io/varbvs
GNU General Public License v3.0
42 stars 14 forks source link

Inconsistencies between simulated and calculated pip #36

Closed garyzhubc closed 11 months ago

garyzhubc commented 11 months ago

Hi, I'm not sure why I would get such inconsistency between posterior sample and PIP. The two numbers are supposed to be the same give the variational family approximate PIP independently.

> mean(unlist(lapply(1:sus_all_num_samples, function(i) (max(sus_all_sample$gamma[31:40,i])>0))))
[1] 0.11443
> 1-prod(1-varb$pip[31:40])
[1] 0.4494387