langcog/tidyboot

Binomial data gives funky upper bound

Closed this issue · 5 comments

Minimal example

b2 <- data_frame(value = rbinom(n = 20, size = 1, prob = 0.5), condition = 1)
b1 <- data_frame(value = rbinom(n = 20, size = 1, prob = 0.7), condition = 2)
df.boot <- bind_rows(b1, b2) %>%
  group_by(condition) %>%
  tidyboot_mean(column = value)

I get

condition<dbl> | n<int> | empirical_mean<dbl> | ci_lower<dbl> | mean<dbl> | ci_upper<dbl>
-- | -- | -- | -- | -- | --
1 | 20 | 0.55 | 0.312500 | 0.5463785 | 0.5463785
2 | 20 | 0.95 | 0.826087 | 0.9503563 | 0.9503563

looks like something that broke in the cran release--my old github version worked ok.

I'll try to sort this out tomorrow eve if @mikabr doesn't get to this first.

ack, I know what's wrong, it's a namespace collision bug that I fixed earlier but then re-introduced for some foolish reason, I'll fix it

thanks for catch @mhtess!

Have you pushed this to CRAN? I still get wonky results with newly installed version from CRAN (but not from GitHub)

we haven't pushed to CRAN yet, but probably should!