View source: R/Custom.functions.R
bictabCustom | R Documentation |
This function creates a model selection table from model input (log-likelihood, number of estimated parameters) supplied by the user instead of extracting the values automatically from a list of candidate models. The models are ranked based on the BIC (Schwarz 1978) or on a quasi-likelihood analogue (QBIC) corrected for overdispersion. The table ranks the models based on the selected information criteria and also provides delta BIC and BIC weights.
bictabCustom(logL, K, modnames = NULL, nobs = NULL, sort = TRUE,
c.hat = 1)
logL |
a vector of log-likelihood values for the models in the candidate model set. |
K |
a vector containing the number of estimated parameters for each model 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 |
nobs |
the sample size required to compute the AICc or QAICc. |
sort |
logical. If |
c.hat |
value of overdispersion parameter (i.e., variance inflation factor)
such as that obtained from |
bictabCustom
constructs a model selection table based on BIC or
QBIC. This function is most useful when model input is imported into
R from other software (e.g., Program MARK, PRESENCE) or for model
classes that are not yet supported by bictab
.
bictabCustom
creates an object of class bictab
with the
following components:
Modname |
the name of each model of the candidate model set. |
K |
the number of estimated parameters for each model. |
(Q)BIC |
the information criteria requested for each model (BIC, QBIC). |
Delta_(Q)BIC |
the appropriate delta BIC 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)BICWt |
the BIC 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 BIC weights. These are only meaningful if results in table are sorted in decreasing order of BIC 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. |
Marc J. Mazerolle
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.
Dail, D., Madsen, L. (2011) Models for estimating abundance from repeated counts of an open population. Biometrics 67, 577–587.
Lebreton, J.-D., Burnham, K. P., Clobert, J., Anderson, D. R. (1992) Modeling survival and testing biological hypotheses using marked animals: a unified approach with case-studies. Ecological Monographs 62, 67–118.
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.
Royle, J. A. (2004) N-mixture models for estimating population size from spatially replicated counts. Biometrics 60, 108–115.
Schwarz, G. (1978) Estimating the dimension of a model. Annals of Statistics 6, 461–464.
AICcCustom
, aictabCustom
,
confset
, c_hat
, evidence
,
ictab
, modavgCustom
##vector with model LL's
LL <- c(-38.8876, -35.1783, -64.8970)
##vector with number of parameters
Ks <- c(7, 9, 4)
##create a vector of names to trace back models in set
Modnames <- c("Cm1", "Cm2", "Cm3")
##generate BIC table
bictabCustom(logL = LL, K = Ks, modnames = Modnames, nobs = 121,
sort = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.