Learn R Programming

AICcmodavg (version 2.3-2)

summaryOD: Display Model Summary Corrected for Overdispersion

Description

This function displays the estimates of a model with standard errors corrected for overdispersion for a variety of model classes. The output includes either confidence intervals based on the normal approximation or Wald hypothesis tests corrected for overdispersion.

Usage

summaryOD(mod, c.hat = 1, conf.level = 0.95, 
          out.type = "confint", ...)

# S3 method for glm summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitOccu summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitColExt summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitOccuRN summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitPCount summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitPCO summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitDS summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitGDS summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitOccuFP summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitMPois summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitGMM summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitGPC summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitOccuMulti summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitOccuMS summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitOccuTTD summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitMMO summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for unmarkedFitDSO summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for glmerMod summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for maxlikeFit summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for multinom summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

# S3 method for vglm summaryOD(mod, c.hat = 1, conf.level = 0.95, out.type = "confint", ...)

Value

summaryOD returns an object of class summaryOD as a list with the following components:

out.type

the type of output requested by the user.

c.hat

the c.hat estimate used to adjust standard errors.

conf.level

the confidence level used to compute confidence intervals around the estimates.

outMat

the output of the model corrected for overdispersion organized in a matrix.

Arguments

mod

an object of class glm, glmmTMB, maxlikeFit, mer, merMod, multinom, vglm, and various unmarkedFit classes containing the output of a model.

c.hat

value of overdispersion parameter (i.e., variance inflation factor) such as that obtained from c_hat, mb.gof.test, or Nmix.gof.test.

conf.level

the confidence level (\(1 - \alpha\)) requested for the computation of confidence intervals.

out.type

the type of summary requested for each parameter estimate. If out.type = "confint", computes confidence intervals corrected for overdispersion, whereas out.type = "nhst" conducts null-hypothesis statistical testing corrected for overdispersion.

...

additional arguments passed to the function.

Author

Marc J. Mazerolle

Details

Overdispersion occurs when the variance in the data exceeds that expected from a theoretical distribution such as the Poisson or binomial (McCullagh and Nelder 1989, Burnham and Anderson 2002). When the model is correct, small values of c-hat (1 < c-hat < 4) can reflect minor deviations from model assumptions (Burnham and Anderson 2002). In such cases, it is possible to adjust standard errors of parameter estimates by multiplying with sqrt(c.hat) (McCullagh and Nelder 1989). This is the correction applied by summaryOD.

Depending on the type of summary requested, i.e., out.type = "confint" or out.type = "nhst", summaryOD will return either confidence intervals based on the normal approximation or Wald tests for each parameter estimate (Agresti 1990).

For binomial distributions, note that values of c.hat > 1 are only appropriate with trials > 1 (i.e., success/trial or cbind(success, failure) syntax). The function supports different model types such as Poisson GLM's and GLMM's, single-season occupancy models (MacKenzie et al. 2002), dynamic occupancy models (MacKenzie et al. 2003), or N-mixture models (Royle 2004, Dail and Madsen 2011).

References

Agresti, A. (2002) Categorical Data Analysis. Second edition. John Wiley and Sons: New Jersey.

Burnham, K. P., Anderson, D. R. (2002) Model Selection and Multimodel Inference: a practical information-theoretic approach. Second edition. Springer: New York.

Dail, D., Madsen, L. (2011) Models for estimating abundance from repeated counts of an open population. Biometrics 67, 577--587.

MacKenzie, D. I., Nichols, J. D., Lachman, G. B., Droege, S., Royle, J. A., Langtimm, C. A. (2002) Estimating site occupancy rates when detection probabilities are less than one. Ecology 83, 2248--2255.

MacKenzie, D. I., Nichols, J. D., Hines, J. E., Knutson, M. G., Franklin, A. B. (2003) Estimating site occupancy, colonization, and local extinction when a species is detected imperfectly. Ecology 84, 2200--2207.

Mazerolle, M. J. (2006) Improving data analysis in herpetology: using Akaike's Information Criterion (AIC) to assess the strength of biological hypotheses. Amphibia-Reptilia 27, 169--180.

McCullagh, P., Nelder, J. A. (1989) Generalized Linear Models. Second edition. Chapman and Hall: New York.

Royle, J. A. (2004) N-mixture models for estimating population size from spatially replicated counts. Biometrics 60, 108--115.

See Also

c_hat, mb.gof.test, Nmix.gof.test, anovaOD

Examples

Run this code
##anuran larvae example from Mazerolle (2006)
data(min.trap)
##assign "UPLAND" as the reference level as in Mazerolle (2006)          
min.trap$Type <- relevel(min.trap$Type, ref = "UPLAND") 

##run model
m1 <- glm(Num_anura ~ Type + log.Perimeter + Num_ranatra,
          family = poisson, offset = log(Effort),
          data = min.trap) 

##check c-hat for global model
c_hat(m1) #uses Pearson's chi-square/df

##display results corrected for overdispersion
summaryOD(m1, c_hat(m1))
summaryOD(m1, c_hat(m1), out.type = "nhst")

##example with occupancy model
if (FALSE) {
##load unmarked package
if(require(unmarked)){
   
   data(bullfrog)
     
   ##detection data
   detections <- bullfrog[, 3:9]

   ##assemble in unmarkedFrameOccu
   bfrog <- unmarkedFrameOccu(y = detections)
     
   ##run model
   fm <- occu(~ 1 ~ 1, data = bfrog)

   ##check GOF
   ##GOF <- mb.gof.test(fm, nsim = 1000)
   ##estimate of c-hat:  1.89

   ##display results after overdispersion adjustment
   summaryOD(fm, c.hat = 1.89)
   summaryOD(fm, c.hat = 1.89, out.type = "nhst")

   detach(package:unmarked)
}
}

Run the code above in your browser using DataLab