beta = rnorm(100,0,1)
betahat= beta+rnorm(100,0,1)
ash.beta = ash(betahat,1,mixcompdist="normal")
comp_postmean(ash.beta$fitted.g,betahat,rep(1,100),NULL)
comp_postsd(ash.beta$fitted.g,betahat,rep(1,100),NULL)
comppostprob(ash.beta$fitted.g,betahat,rep(1,100),NULL)
Run the code above in your browser using DataLab