# Note: This model converges well if you are running R version 3.0.2, but may not converge with later # versions. If you are having convergence issues, please try with version 3.0.2. mnb1 <- glmer.nb(total.fruits ~ nutrient*amd + rack + status + (1|popu)+ (1|gen), data=dat.tf, control=glmerControl(optimizer="bobyqa")) # Although beyond the scope of this workshop, the new "control" argument specifies the way we # optimize the parameter values (i.e. by taking the derivative of a function or proceeding by iteration). # When taking the derivative is not possible, an iterative algorithm such as bobyqa (Bound Optimization # BY Quadratic Approximation) is used. # Overdispersion? overdisp_fun(mnb1)