stephenslab / mr.ash

R package implementing methods for multiple regression with adaptive shrinkage priors ("mr.ash").
https://stephenslab.github.io/mr.ash/
Other
4 stars 0 forks source link

sd vs variances #18

Open stephens999 opened 11 months ago

stephens999 commented 11 months ago

The output resid.sd appears to be the variance, not the sd. The docs say it is the variance, so appear to be correct, but the name of the variable is very confusing.

stephens999 commented 11 months ago

the initialization of resid.sd in init_mr_ash uses the sd though resid.sd <- sqrt((n-1)/n) sd(y - X %% b)

stephens999 commented 11 months ago

actually the prior sd may also be the prior variances!

Generally, mr.ash.alpha used variances (eg sigma2, sa2) so since we are interfacing with that code we should probably stick with variances throughout to avoid errors.

pcarbo commented 11 months ago

Actually I think we were trying to make the interface more consistent with ashr; ash() has input argument mixsd.