Closed willwerscheid closed 5 years ago
It looks like code for halfnormal
has not been added to constrain_mix
yet. When updating, we should probably handle the case where pi
is all zeros after truncating. Also I am not sure why pi
is passed in along with g
instead of just using g$pi
.
Try for example
ash(1:10, 1, mixcompdist = "halfnormal", grange=c(-0.1, 20))
. We setsigmaamax = min(max(abs(grange-mode)), sigmaamax)
so both the positive and negative components ofg
are capped at 0.1. I have not yet looked carefully, but I think we can remove the handling ofgrange
fromautoselect.mixsd
and letgconstrain
take care of it.