Predicting to raster stack at population level with glmmTMB in R
问题 I'm trying to predict to a raster stack in R, using a GLMM I fit with the glmmTMB package, at the population level (i.e. setting random effects to 0). I followed Ben Bolker's solution in this thread which works for models fit with lme4 , but even though the function argument re.form=~0 appears to be applicable to predict.glmmTMB in addition to predict.merMod , it's not working for me when I predict using a glmmTMB model. Here is an example using the same example code provided by Robert