Closed ddsjoberg closed 1 year ago
Thank you @bbolker 🍁
Good evening. Thank you for the prompt fix.
After installing the dev version and running the reprex provided above I am still having trouble getting the random parameters.
Although when specifying component = "zi"
both an estimate and the correct CI are provided, when component = "cond"
is specified it provides the correct estimate but the CI of the "zi"
random parameter.
When no component
is specified the CI of the "zi" random parameter is presented for the "cond" estimate and for the "zi" estimate there is no CI (NA
).
Feel free to ask for any additional information, I will try to be of assistance within my knowledge limitations. Thank you in advance.
Hmm, working on this. So far don't see any problems/behaving as expected on my machine ... could we have results of sessionInfo()
or devtools::session_info()
please?
library(magrittr); library(broom.mixed)
gg <- . %>% dplyr::filter(effect %in% "ran_pars") %>%
dplyr::select(effect, component, group, term, estimate, conf.low, conf.high)
tidy(zinbm2, conf.int = TRUE) %>% gg
## effect component group term estimate conf.low conf.high
## 1 ran_pars cond site sd__(Intercept) 0.137 0.0279 0.675
## 2 ran_pars zi site sd__(Intercept) 1.22 0.721 2.07
tidy(zinbm2, component = "cond", conf.int = TRUE) %>% gg
## effect component group term estimate conf.low conf.high
## 1 ran_pars cond site sd__(Intercept) 0.137 0.0279 0.675
tidy(zinbm2, component = "zi", conf.int = TRUE) %>% gg
## effect component group term estimate conf.low conf.high
## 1 ran_pars zi site sd__(Intercept) 1.22 0.721 2.07
sapply(c("broom.mixed", "glmmTMB"), \(x) format(packageVersion(x)))
## broom.mixed glmmTMB
## "0.2.9.5" "1.1.4"
Will try again with development version of glmmTMB
in case that matters ...
Realized that was working with glmmTMB
1.1.3 version. After updating to 1.1.4 everything worked perfectly.
I am sorry for all the trouble and thank you again for your time and dedication.
Glad to hear it.
Hello! Thank you again for this incredibly useful package!
A gtsummary user reported an issue with a repeated random parameter being printed. I did some investigating, I think the error is in
tidy.glmmTMB()
. In the example below, I am interested in reporting thecomponent = "cond"
portions of the model. When I add this to the tidy call, the random components"cond"
and"zi"
are both reported. The zi component still appears, but with the incorrect estimate, but with the correct confidence interval.Just in case, I installed the dev version of glmmTMB and tested on that version as well.
Thank you!
Created on 2022-10-31 with reprex v2.0.2