Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`conf.level` not working for merMod objects #30

Closed
strengejacke opened this issue Oct 4, 2018 · 5 comments
Closed

`conf.level` not working for merMod objects #30

strengejacke opened this issue Oct 4, 2018 · 5 comments

Comments

@strengejacke
Copy link
Contributor

@strengejacke strengejacke commented Oct 4, 2018

Argument conf.level does not affect the confidence intervals in the output...

library(lme4)
#> Loading required package: Matrix
library(broom.mixed)

m <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), cbpp, binomial, nAGQ = 0)

broom.mixed::tidy(m, conf.int = TRUE, conf.level = .95)
#> # A tibble: 5 x 9
#>   effect group term  estimate std.error statistic  p.value conf.low
#>   <chr>  <chr> <chr>    <dbl>     <dbl>     <dbl>    <dbl>    <dbl>
#> 1 fixed  <NA>  (Int~   -1.36      0.228     -5.98  2.26e-9    -1.81
#> 2 fixed  <NA>  peri~   -0.976     0.303     -3.22  1.29e-3    -1.57
#> 3 fixed  <NA>  peri~   -1.11      0.324     -3.43  5.94e-4    -1.75
#> 4 fixed  <NA>  peri~   -1.56      0.424     -3.67  2.38e-4    -2.39
#> 5 ran_p~ herd  sd__~    0.642    NA         NA    NA          NA   
#> # ... with 1 more variable: conf.high <dbl>

broom.mixed::tidy(m, conf.int = TRUE, conf.level = .5)
#> # A tibble: 5 x 9
#>   effect group term  estimate std.error statistic  p.value conf.low
#>   <chr>  <chr> <chr>    <dbl>     <dbl>     <dbl>    <dbl>    <dbl>
#> 1 fixed  <NA>  (Int~   -1.36      0.228     -5.98  2.26e-9    -1.81
#> 2 fixed  <NA>  peri~   -0.976     0.303     -3.22  1.29e-3    -1.57
#> 3 fixed  <NA>  peri~   -1.11      0.324     -3.43  5.94e-4    -1.75
#> 4 fixed  <NA>  peri~   -1.56      0.424     -3.67  2.38e-4    -2.39
#> 5 ran_p~ herd  sd__~    0.642    NA         NA    NA          NA   
#> # ... with 1 more variable: conf.high <dbl>

Created on 2018-10-04 by the reprex package (v0.2.1)

@bbolker
Copy link
Owner

@bbolker bbolker commented Oct 4, 2018

thanks for this and others, will try to get to them all soon ...

@bbolker
Copy link
Owner

@bbolker bbolker commented Oct 4, 2018

should be fixed: e9da820

@IndrajeetPatil
Copy link

@IndrajeetPatil IndrajeetPatil commented Oct 9, 2018

Do you plan to have the next release soon (with all the confidence interval issues raised by @strengejacke fixed)?

After its release on CRAN, I had immediately added broom.mixed as a dependency for two of my packages. But now the results from my package functions that rely on merMod tidiers look incorrect on CRAN and I would like to correct that asap.

@bbolker
Copy link
Owner

@bbolker bbolker commented Oct 9, 2018

Yes. CRAN wants a new version by October 22 anyway to deal with some dependency issues. The most critical (IMO) of the issues raised by @strengejacke are addressed - all the ones that I would classify as actual bugs - but I was hoping to close a couple more issues (#34, #37) before sending it ...

@IndrajeetPatil
Copy link

@IndrajeetPatil IndrajeetPatil commented Oct 9, 2018

Cool, sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.