beta = rnorm(100,0,1)
betahat= beta+rnorm(100,0,1)
sebetahat=rep(1,100)
ash.beta = ash(betahat,1,mixcompdist="normal")
cdf0 = cdf_post(ash.beta$fitted.g,0,betahat,sebetahat,NULL)
plot(cdf0,1-ash.beta$PositiveProb)
Run the code above in your browser using DataLab