IC {paleoTS} | R Documentation |
These functions compute information criteria (IC
) or Akaike weights based on information scores (akaike.wts
).
Function IC
is used internally by the optimization functions and generally will not need to be called directly by the user.
IC(w, logL = NULL, K = NULL, n = NULL, meth = c("AICc", "AIC", "BIC")) akaike.wts(aa)
w |
output from an optimization such as opt.GRW |
logL |
log-likelihood |
K |
the number of free parameters |
n |
sample size for AICc and BIC calculations |
meth |
which information criterion to compute; one of AIC, AICc, or BIC |
aa |
vector of AIC or AICc values used to compute Akaike weights |
Function IC
can take two kinds of arguments. The easiest is to send it the output of any of the paleoTS
optimizations, in which case the function will automaically extract the necessary information. Alternatively, the
log-likelihoods, number of parameters and sample size can be passed explicitly.
Function akaike.wts
takes a vector of AIC or AICc values and computes corresponding Akaike weights.
the computed information criterion, or a vector of Akaike weights
Gene Hunt
Hunt, G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology32:578–601.
x <- sim.GRW(ns=40, ms=0.1, vs=0.1) m1<- opt.GRW(x) m2<- opt.URW(x) m3<- opt.Stasis(x) akaike.wts(c(m1$AICc, m2$AICc, m3$AICc)) # it is easier to use fit3models()