[R-sig-ME] coefplot2 in conjunction with glmmTMB and glmer

Ben Bolker bbolker at gmail.com
Sat Oct 21 23:36:46 CEST 2017


  coefplot2 is pretty well deprecated now, in favor of the "broom"
package.  In order to get nice coefficient plots/tables for glmmTMB
objects, I would suggest

1. install my fork of broom, which knows how to deal with those objects:
  devtools::install_github("bbolker/broom")

2a. use tidy() to extract the coefficient table and ggplot to plot the
coefficient plots (geom_pointrange is useful), or

2b. install the dotwhisker package, which should (in conjunction with
broom) do this automatically

 e.g.

library(glmmTMB)
example(glmmTMB)
library(dotwhisker)
dwplot(m3)  ## hmm, RE standard dev disappears
dwplot(m3,effects="fixed")  ## maybe we didn't want it anyway



On 17-10-21 05:28 PM, dani wrote:
> Hello everyone,
> 
> <http://aka.ms/weboutlook>
> 
> I am learning how to use glmmTMB and I encountered the following issue:
> 
> I cannot get coefplot2 to work with my glmmTMB model. None of the options work (e.g coeftab). When I apply coefplot2 to the simple glmer model coeftab returns the following error:
> Error in UseMethod("coeftab", object) :
>   no applicable method for 'coeftab' applied to an object of class "c('glmerMod', 'merMod')"
> 
> I am not sure what to do as I would like to be able to get a plot of the regression estimates for the these two models. So far, even though coeftab  is not working, I can only plot the estimates for the glmer model.
> 
> I suspect it is because both glmerMod and glmmTMb are S4 objects.
> 
> Thank you all very much!
> Best,
> Dani N-M
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>



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