summaryOD | R Documentation |
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.
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'glm'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitOccu'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitColExt'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitOccuRN'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitPCount'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitPCO'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitDS'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitGDS'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitOccuFP'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitMPois'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitGMM'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitGPC'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitOccuMulti'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitOccuMS'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitOccuTTD'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitMMO'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'unmarkedFitDSO'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'glmerMod'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'maxlikeFit'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'multinom'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
## S3 method for class 'vglm'
summaryOD(mod, c.hat = 1, conf.level = 0.95,
out.type = "confint", ...)
mod |
an object of class |
c.hat |
value of overdispersion parameter (i.e., variance inflation factor)
such as that obtained from |
conf.level |
the confidence level ( |
out.type |
the type of summary requested for each parameter estimate. If
|
... |
additional arguments passed to the function. |
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).
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 |
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. |
Marc J. Mazerolle
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.
c_hat
, mb.gof.test
,
Nmix.gof.test
, anovaOD
##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
## Not run:
##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)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.