Closed h-huss closed 2 months ago
Thanks. You're perfectly right, this is a bug. Will soon be fixed.
This is fixed with 0.99.55:
> library(DescTools)
> packageVersion("DescTools")
[1] '0.99.55'
>
> MultinomCI(c(100,100,100,100,100,100), sides='right')
est lwr.ci upr.ci
[1,] 0.1666667 0 0.2018585
[2,] 0.1666667 0 0.2018585
[3,] 0.1666667 0 0.2018585
[4,] 0.1666667 0 0.2018585
[5,] 0.1666667 0 0.2018585
[6,] 0.1666667 0 0.2018585
> MultinomCI(c(100,100,100,100,100,100), sides='left')
est lwr.ci upr.ci
[1,] 0.1666667 0.1316667 1
[2,] 0.1666667 0.1316667 1
[3,] 0.1666667 0.1316667 1
[4,] 0.1666667 0.1316667 1
[5,] 0.1666667 0.1316667 1
[6,] 0.1666667 0.1316667 1
MultinomCI yields strange (0 / 1) estimates for one-sided intervals.
This is most likely caused by https://github.com/AndriSignorell/DescTools/blob/cc8369d3d8edb35563785d97ca962460c2de97d3/R/StatsAndCIs.r#L3574-L3577 which overrides the second/third row instead of column