stephenslab / mashr

An R package for multivariate adaptive shrinkage.
https://stephenslab.github.io/mashr
Other
88 stars 19 forks source link

Adding Nullbiased Weight to mash #106

Closed eweine closed 2 years ago

eweine commented 2 years ago

Hello,

I was recently experimenting with the "nullbiased" prior option in the mash function. I noticed that in many cases, setting prior = "nullbiased" did not substantially change the resulting estimates of the mixture components pi. I looked through the ashr package, and I noticed that in the ash function there is a parameter for the nullweight. I've created a PR to add this same parameter to the mash function that should be completely backwards compatible. Setting this parameter to a large number in the mash function seems to substantially increase the weight on the null effects matrix.

Perhaps it would not be a good idea to merge this, especially if you'd like to discourage users from increasing the nullweight. If that is the case, could you explain why you selected a value of 10 for the nullweight for the "nullbiased" prior? I noticed that this value is hardcoded in the set_prior function in the mash.R file.

Thank you!!

eweine commented 2 years ago

Fixed with PR.