calc_AICc_vals: Calculate AICc values for a list of models

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/BioGeoBEARS_generics_v1.R

Description

A list of AICc values (second order Akaike Information Criterion) is calculated from two input lists. Lower values of AICc indicate some combination of better fit to the data and more parsimony in the model (fewer free parameters). AICc contains a correction for sample size.

Usage

1
  calc_AICc_vals(LnL_vals, nparam_vals, samplesize)

Arguments

LnL_vals

A vector of log-likelihoods (typically negative, but may not be for continuous data).

nparam_vals

A vector of the number of parameters for each model.

samplesize

A single samplesize, or a vector of the samplesizes each model. However, samplesize should always be the same for all comparisons, since maximum likelihood and AIC/AICc model-selection methods are always comparing different models on the same data, not different data on the same mode.

Details

The two input lists are:

1. A list of data likelihoods under a variety of models.
2. A list of the number of free parameters under each model.

samplesize can be a scalar or vector; but see below.

See Burnham et al. (2002) and http://www.brianomeara.info/tutorials/aic for discussion of AIC, AICc and their uses.

Value

AICc_vals A vector of AICc results.

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster http://www.brianomeara.info/tutorials/aic

Burnham_Anderson_2002

Matzke_2012_IBS

See Also

calc_AIC_vals, calc_AICc_column

Examples

1
2
3
4
5
6
7
LnL_vals = c(-34.5, -20.9)
nparam_vals = c(2, 3)
calc_AICc_vals(LnL_vals, nparam_vals, samplesize=20)

LnL_vals = c(-20.9, -20.9, -20.9, -20.9)
nparam_vals = c(3, 4, 5, 6)
calc_AICc_vals(LnL_vals, nparam_vals, samplesize=20)

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.