@pcarbo discovered issues in comp_cdf.tnormalmix while running the following:
library(ebnm)
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 matrix(pnorm(YY[subset], MM[subset], SD[subset]), k, n) :
# data length [468] is not a sub-multiple or multiple of the number of columns [300]
# 3: In pnorm(A[subset], MM[subset], SD[subset], lower.tail) : NaNs produced
# 4: In matrix(pnorm(A[subset], MM[subset], SD[subset], lower.tail), :
# data length [468] is not a sub-multiple or multiple of the number of columns [300]
# 5: In pnorm(B[subset], MM[subset], SD[subset], lower.tail) : NaNs produced
# 6: In matrix(pnorm(B[subset], MM[subset], SD[subset], lower.tail), :
# data length [468] is not a sub-multiple or multiple of the number of columns [300]
# 7: In tmp[subset] <- (pnc - pna)/(pnb - pna) :
# number of items to replace is not a multiple of replacement length
# 8: Removed 168 rows containing missing values or values outside the scale range
# (`geom_line()`).
the ncol argument should be removed (i.e., it should read matrix(dat, k) instead of matrix(dat, k, n) since the number of columns is no longer n after subsetting).
@pcarbo discovered issues in
comp_cdf.tnormalmix
while running the following:I believe that in these lines:
the
ncol
argument should be removed (i.e., it should readmatrix(dat, k)
instead ofmatrix(dat, k, n)
since the number of columns is no longern
after subsetting).