informationCriterion: Information criterion and weights for a set of models

Description Usage Arguments Details Value Author(s) References

View source: R/informationCriterion.R

Description

Returns AIC, AICc, and BIC values and weights for a set of models.

Usage

1
2
3
4
5
  informationCriterion(u = NULL, lnL = NULL, K, n = 1, names = NULL)
  ## S3 method for class 'hansenBatch'
informationCriterion(hansenBatch)
  ## S3 method for class 'informationCriterion'
print(x, ...)

Arguments

u

A vector of deviances, indexed by model.

lnL

A vector of log-likelihoods, indexed by model.

K

A vector of degrees-of-freedom / number of free parameters, indexed by model.

n

Sample size; for a phylogenetic comparative analysis, n = the number of tips.

names

Optional vector of model names, indexed by model.

hansenBatch

Output from runBatchHansen.

x

Output from informationCriterion.

...

Additional arguments to be passed along to print

Details

At the minimum, a vector of either the model log-likelihoods (lnL) or deviances (u = -2 * lnL) and a vector of number of free parameters for each model (K) must be provided for the function to work. If the sample size (n) is not provided, the function calculates AICc and BIC assuming n = 1. Information criterion statistics are calculated following Burnham and Anderson (2002).

Value

A list with the following vectors, all indexed by model number:

names

Model names; if not provided, a vector of 1:length(u).

u

Deviance.

K

Degrees of freedom.

AIC

Akaike information criterion.

AICc

Small-sample AIC.

BIC

Bayes information criterion.

AICwi

AIC weight.

AICcwi

AICc weight.

BICwi

BIC weight.

Author(s)

Andrew Hipp ahipp@mortonarb.org

References

Burnham, K. P., and D. R. Anderson (2002) Model selection and multimodel inference: a practical information-theoretic approach. Springer, New York.


maticce documentation built on May 2, 2019, 6:13 p.m.