There's more...

Negative binomial models can be adjusted using the very same functions that we have used so far; but the problem is that we need to specify the overdispersion parameter manually (and we usually don't know it). The glm.nb() and the glmer.nb() are designed to account for this, and they take care of fitting the extra parameter. 

Although some practitioners prefer to use negative binomial models over Poisson ones because it avoids the overdispersion problem entirely, the truth is that they are slightly more complex. Usually, complexity in statistics is paid for by having less precise estimates (and greater variability in the predictions). 

Interestingly, the results do not change by much when compared with their Poisson counterparts. The theta parameter, which controls the extra variance, can be seen to be 6.7 with a standard deviation of just 1.46, suggesting that using a negative binomial model might be a good idea:

fixed_std_model = glm.nb(decrease ~ treatment,data=OrchardSprays) 
summary(fixed_std_model)
model_2 = lme4::glmer.nb(decrease ~ treatment + (1|colpos) + (1|rowpos), data = OrchardSprays)
ss2 <- getME(model_2,c("theta","fixef"))
model_3 <- update(model_1,start=ss2)
summary(model_3)

The following screenshot shows the GLM model—all effects are fixed:

The following screenshot GLM model with mixed effects:

     

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.155.243