Closed pcarbo closed 2 months ago
these warnings are coming from comp_cdf.tnormalmix
-- i am going to transfer this issue to ashr
another issue (which does belong here) is a negative mode results in a negative sd due to the way scale
is interpreted. we should just ensure that sd is positive by setting sd = abs(mode * scale)
@pcarbo It now works for me with the latest PRs both here and in ashr
. Could you please verify?
@willwerscheid The errors are gone, but I still get warnings:
set.seed(1)
res <- ebnm_generalized_binary(rnorm(1000),scale = 1,mode = -0.5)
plot(res,incl_cdf = TRUE,incl_pm = FALSE)
# Warning messages:
# 1: In pnorm(YY[subset], MM[subset], SD[subset]) : NaNs produced
# 2: In pnorm(A[subset], MM[subset], SD[subset], lower.tail) : NaNs produced
# 3: In pnorm(B[subset], MM[subset], SD[subset], lower.tail) : NaNs produced
# 4: Removed 168 rows containing missing values or values outside the scale range
# (`geom_line()`).
Also, the plot doesn't look right.
Do you get the same warnings?
@pcarbo make sure to use the changes in the latest pull request for ebnm. The NaNs are coming from the old behavior that set sd = scale mode (which is negative when mode is negative). This was updated so that sd = abs(scale mode).
I see! With pull request #134, it works fine.
awesome, thanks for checking
This works:
But this does not: