bbolker/broom.mixed

'exponentiate' option for glmmTMB tidier

bbolker opened this issue · 1 comments

From glmmTMB/glmmTMB#553:

offering this up as I could potentially implement if people think it's useful. Is there any reason why the tidy.glmmTMB method couldn't simply implement something like the exponentiate param used in tidy.rlmerMod?

It's pretty straightforward, and it scales estimates, CI's and SE's all at once:

    if (exponentiate) {
      vv <- intersect(c("estimate", "conf.low", "conf.high"), 
        names(ret))
      ret <- (ret %>% mutate_at(vars(vv), ~exp(.)) %>% 
        mutate(std.error = std.error * estimate))
    } 

note that SEs need to be treated more carefully (multiplied by exponentiated fit?)

added in 6a34c99