# AICc: Computing AIC, AICc, QAIC, and QAICc In AICcmodavg: Model Selection and Multimodel Inference Based on (Q)AIC(c)

## Description

Functions to computes Akaike's information criterion (AIC), the second-order AIC (AICc), as well as their quasi-likelihood counterparts (QAIC, QAICc).

## Usage

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'aov' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'betareg' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'clm' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'clmm' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'coxme' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'coxph' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'fitdist' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'fitdistr' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'glm' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, c.hat = 1, ...) ## S3 method for class 'gls' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'gnls' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'hurdle' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'lavaan' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'lm' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'lme' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'lmekin' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'maxlikeFit' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, c.hat = 1, ...) ## S3 method for class 'mer' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'merMod' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'multinom' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, c.hat = 1, ...) ## S3 method for class 'nlme' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'nls' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'polr' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'rlm' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'survreg' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) ## S3 method for class 'unmarkedFit' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, c.hat = 1, ...) ## S3 method for class 'vglm' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, c.hat = 1, ...) ## S3 method for class 'zeroinfl' AICc(mod, return.K = FALSE, second.ord = TRUE, nobs = NULL, ...) 

## Arguments

 mod an object of class aov, betareg, clm, clmm, clogit, coxme, coxph, fitdist, fitdistr, glm, gls, gnls, hurdle, lavaan, lm, lme, lmekin, maxlikeFit, mer, merMod, multinom, nlme, nls, polr, rlm, survreg, vglm, zeroinfl, and various unmarkedFit classes containing the output of a model. return.K logical. If FALSE, the function returns the information criterion specified. If TRUE, the function returns K (number of estimated parameters) for a given model. second.ord logical. If TRUE, the function returns the second-order Akaike information criterion (i.e., AICc). nobs this argument allows to specify a numeric value other than total sample size to compute the AICc (i.e., nobs defaults to total number of observations). This is relevant only for mixed models or various models of unmarkedFit classes where sample size is not straightforward. In such cases, one might use total number of observations or number of independent clusters (e.g., sites) as the value of nobs. c.hat value of overdispersion parameter (i.e., variance inflation factor) such as that obtained from c_hat. Note that values of c.hat different from 1 are only appropriate for binomial GLM's with trials > 1 (i.e., success/trial or cbind(success, failure) syntax), with Poisson GLM'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). If c.hat > 1, AICc will return the quasi-likelihood analogue of the information criteria requested and multiply the variance-covariance matrix of the estimates by this value (i.e., SE's are multiplied by sqrt(c.hat)). This option is not supported for generalized linear mixed models of the mer or merMod classes. ... additional arguments passed to the function.

## Details

AICc computes one of the following four information criteria:

Akaike's information criterion (AIC, Akaike 1973),

-2 * log-likelihood + 2 * K,

where the log-likelihood is the maximum log-likelihood of the model and K corresponds to the number of estimated parameters.

Second-order or small sample AIC (AICc, Sugiura 1978, Hurvich and Tsai 1991),

-2 * log-likelihood + 2 * K * (n/(n - K - 1)),

where n is the sample size of the data set.

Quasi-likelihood AIC (QAIC, Burnham and Anderson 2002),

QAIC = \frac{-2 * log-likelihood}{c-hat} + 2 * K,

where c-hat is the overdispersion parameter specified by the user with the argument c.hat.

Quasi-likelihood AICc (QAICc, Burnham and Anderson 2002),

QAIC = \frac{-2 * log-likelihood}{c-hat} + 2 * K * (n/(n - K - 1))

.

Note that AIC and AICc values are meaningful to select among gls or lme models fit by maximum likelihood. AIC and AICc based on REML are valid to select among different models that only differ in their random effects (Pinheiro and Bates 2000).

## Value

AICc returns the AIC, AICc, QAIC, or QAICc, or the number of estimated parameters, depending on the values of the arguments.

## Note

The actual (Q)AIC(c) values are not really interesting in themselves, as they depend directly on the data, parameters estimated, and likelihood function. Furthermore, a single value does not tell much about model fit. Information criteria become relevant when compared to one another for a given data set and set of candidate models.

## Author(s)

Marc J. Mazerolle

## References

Akaike, H. (1973) Information theory as an extension of the maximum likelihood principle. In: Second International Symposium on Information Theory, pp. 267–281. Petrov, B.N., Csaki, F., Eds, Akademiai Kiado, Budapest.

Anderson, D. R. (2008) Model-based Inference in the Life Sciences: a primer on evidence. Springer: New York.

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

Burnham, K. P., Anderson, D. R. (2004) Multimodel inference: understanding AIC and BIC in model selection. Sociological Methods and Research 33, 261–304.

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

Hurvich, C. M., Tsai, C.-L. (1991) Bias of the corrected AIC criterion for underfitted regression and time series models. Biometrika 78, 499–509.

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.

Pinheiro, J. C., Bates, D. M. (2000) Mixed-effect models in S and S-PLUS. Springer Verlag: New York.

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

Sugiura, N. (1978) Further analysis of the data by Akaike's information criterion and the finite corrections. Communications in Statistics: Theory and Methods A7, 13–26.

AICcCustom, aictab, confset, importance, evidence, c_hat, modavg, modavgShrink, modavgPred, useBIC,
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ##cement data from Burnham and Anderson (2002, p. 101) data(cement) ##run multiple regression - the global model in Table 3.2 glob.mod <- lm(y ~ x1 + x2 + x3 + x4, data = cement) ##compute AICc with full likelihood AICc(glob.mod, return.K = FALSE) ##compute AIC with full likelihood AICc(glob.mod, return.K = FALSE, second.ord = FALSE) ##note that Burnham and Anderson (2002) did not use full likelihood ##in Table 3.2 and that the MLE estimate of the variance was ##rounded to 2 digits after decimal point ##compute AICc for mixed model on Orthodont data set in Pinheiro and ##Bates (2000) ## Not run: require(nlme) m1 <- lme(distance ~ age, random = ~1 | Subject, data = Orthodont, method= "ML") AICc(m1, return.K = FALSE) ## End(Not run)