[R-sig-ME] reporting model estimates values

Juan Pablo Edwards Molina edwardsmolina at gmail.com
Tue Oct 24 15:16:26 CEST 2017


Dear glmmTMB authors & list members ,

For glmer models I use "lsmeans" or "effects" package to report the
coefficient estimated values, but any of them works with glmmTMB
objetcs:

lsmeans::lsmeans(mod, ~ factor, type = "response"); or

effects::allEffects(mod)

How would you suggest me to do that with an glmmTMB model?

Here is a short example (with only two factor levels):

library(glmmTMB)
m1 <- glmmTMB(count~ mined + (1|site),
               zi=~0,
               family=poisson, data=Salamanders)
summary(m1)

m2 <- glmer(count ~ mined + (1|site), family=poisson, data=Salamanders)
summary(m2)

library(lsmeans)
lsmeans(m2, ~ mined, type = "response")

library(effects)
eff.m2 <- allEffects(m2); as.data.frame(eff.m2[[1]])

lsmeans(m1, ~ mined, type = "response")
eff.m2 <- allEffects(m1); as.data.frame(eff.m1[[1]])

Thanks in advance,

Juan Edwards

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list