This function creates a model selection table based on one of the
following information criteria: AIC, AICc, QAIC, QAICc. The table
ranks the models based on the selected information criteria and also
provides delta AIC and Akaike weights. aictab selects the
appropriate function to create the model selection table based on the
object class. The current version works with lists containing objects
of 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, and zeroinfl classes as well as
various models of unmarkedFit classes but does not yet allow
mixing of different classes.
a list storing each of the models in the candidate model set.
modnames
a character vector of model names to facilitate the identification of
each model in the model selection table. If NULL, the function
uses the names in the cand.set list of candidate models (i.e., a named
list). If no names appear in the list and no character vector is
provided, generic names (e.g., Mod1, Mod2) are supplied in
the table in the same order as in the list of candidate models.
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.
sort
logical. If TRUE, the model selection table is ranked according
to the (Q)AIC(c) values.
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,
modavgShrink 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
aictab internally creates a new class for the cand.set
list of candidate models, according to the contents of the list. The
current function is implemented for clogit, coxme,
coxph, fitdist, fitdistr, glm, gls,
gnls, hurdle, lavaan, lm, lme,
lmekin, maxlikeFit, mer, merMod,
multinom, nlme, nls, polr, rlm,
survreg, vglm, and zeroinfl classes as well as
various unmarkedFit classes. The function constructs a model
selection table based on one of the four information criteria: AIC,
AICc, QAIC, and QAICc.
Ten guidelines for model selection:
1) Carefully construct your candidate model set. Each model
should represent a specific (interesting) hypothesis to test.
2) Keep your candidate model set short. It is ill-advised to consider
as many models as there are data.
3) Check model fit. Use your global model (most complex model) or
subglobal models to determine if the assumptions are valid. If none of
your models fit the data well, information criteria will only indicate
the most parsimonious of the poor models.
4) Avoid data dredging (i.e., looking for patterns after an initial round
of analysis).
5) Avoid overfitting models. You should not estimate too many
parameters for the number of observations available in the sample.
6) Be careful of missing values. Remember that values that are missing
only for certain variables change the data set and sample size,
depending on which variable is included in any given model. I suggest
to remove missing cases before starting model selection.
7) Use the same response variable for all models of the candidate model
set. It is inappropriate to run some models with a transformed response
variable and others with the untransformed variable. A workaround is to
use a different link function for some models (e.g., identity vs log link).
8) When dealing with models with overdispersion, use the same value of
c-hat for all models in the candidate model set. For binomial models
with trials > 1 (i.e., success/trial or cbind(success, failure) syntax)
or with Poisson GLM's, you should estimate the c-hat from the most
complex model (global model). If c-hat > 1, you should use the same
value for each model of the candidate model set (where appropriate) and
include it in the count of parameters (K). Similarly, for negative
binomial models, you should estimate the dispersion parameter from the
global model and use the same value across all models.
9) Burnham and Anderson (2002) recommend to avoid mixing the
information-theoretic approach and notions of significance (i.e., P
values). It is best to provide estimates and a measure of their
precision (standard error, confidence intervals).
10) Determining the ranking of the models is just the first step.
Akaike weights sum to 1 for the entire model set and can be interpreted
as the weight of evidence in favor of a given model being the best one
given the candidate model set considered and the data at hand. Models
with large Akaike weights have strong support. Evidence ratios,
importance values, and confidence sets for the best model are all
measures that assist in interpretation. In cases where the top ranking
model has an Akaike weight > 0.9, one can base inference on this single
most parsimonious model. When many models rank highly (i.e., delta
(Q)AIC(c) < 4), one should model-average effect sizes for the parameters
with most support across the entire set of models. Model averaging
consists in making inference based on the whole set of candidate models,
instead of basing conclusions on a single 'best' model. It is an
elegant way of making inference based on the information contained in
the entire model set.
Value
aictab creates an object of class aictab with the
following components:
Modname
the names of each model of the candidate model set.
K
the number of estimated parameters for each model.
(Q)AIC(c)
the information criteria requested for each model
(AIC, AICc, QAIC, QAICc).
Delta_(Q)AIC(c)
the appropriate delta AIC component depending on
the information criteria selected.
ModelLik
the relative likelihood of the model given the
data (exp(-0.5*delta[i])). This is not to be confused with the
likelihood of the parameters given the data. The relative likelihood
can then be normalized across all models to get the model probabilities.
(Q)AIC(c)Wt
the Akaike weights, also termed "model
probabilities" sensu Burnham and Anderson (2002) and Anderson (2008).
These measures indicate the level of support (i.e., weight of
evidence) in favor of any given model being the most parsimonious
among the candidate model set.
Cum.Wt
the cumulative Akaike weights. These are only meaningful
if results in table are sorted in decreasing order of Akaike weights
(i.e., sort = TRUE).
c.hat
if c.hat was specified as an argument, it is included in
the table.
LL
if c.hat = 1 and parameters estimated by maximum likelihood,
the log-likelihood of each model.
Quasi.LL
if c.hat > 1, the quasi log-likelihood of each model.
Res.LL
if parameters are estimated by restricted
maximum-likelihood (REML), the restricted log-likelihood of each
model.
Author(s)
Marc J. Mazerolle
References
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 Research33, 261–304.
Dail, D., Madsen, L. (2011) Models for estimating abundance from
repeated counts of an open population. Biometrics67,
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. Ecology83,
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. Ecology84, 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-Reptilia27, 169–180.
Royle, J. A. (2004) N-mixture models for estimating population
size from spatially replicated counts. Biometrics60,
108–115.