stephens999 / ashr

An R package for adaptive shrinkage
GNU General Public License v3.0
80 stars 36 forks source link

doesn't handle zero sebetahats correctly #84

Open willwerscheid opened 6 years ago

willwerscheid commented 6 years ago

For example, ash(betahat = c(1, 2, 3, 4), sebetahat = c(0, 0, 1, 1)) gives me posterior means of zero for the first two observations.

willwerscheid commented 6 years ago

We might want to handle infinite SEs too, possibly by throwing an error. (We can get infinite SEs in flash.)

willwerscheid commented 5 years ago

calc_pm automatically sets these cases (covered by get_exclusions) to have a mean of zero and a SD of zero. We should change this: zero SEs should return mean = x, sd = 0; infinite SEs and NAs should return prior mean and sd.

willwerscheid commented 5 years ago

Issue #59 can be addressed as part of the same fix.

willwerscheid commented 5 years ago

Infinite SEs also screw up the returned log likelihood.