Skip to content
Prev 16026 / 20628 Next

Plotting partial residuals from a glmmADMB model

I would like to use ggplot2 to plot the partial residuals of an indicator (0 or 1) independent variable in a generalized linear mixed model fit with a "nbinom1" family using glmmadmb. My model has a response variable that is a count, 3 explanatory variables that are continuous, and 7 indicator variables that are 0 when a particular heavy metal is not detected and 1 when it is detected above a threshold value. I'd like to plot the partial residuals of the various independent variables. I think that the model below using the Owl data would be a good example data set for how to do this. The model below has a response variable that is a count, an explanatory variables that is continuous (arrivalTime), two categorical variables (FoodTreatment and SexParent), a random effect of Nest, and uses a "nbinom1" family.

##Using the Owl Data
om <- glmmadmb(SiblingNegotiation~FoodTreatment+ArrivalTime+SexParent+
                 (1|Nest),family="nbinom1",data=Owls)

Could you please suggest a method for plotting the partial residuals of the explanatory variables.

Thank you,
Frances