Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/40-hzarPostProcessing.R
Calculate the AIC or the corrected AIC (AICc) for the given likelihood, number of parameters and number of observations.
Extracts the parameters as needed when passed the correct hzar object.
1 2 3 4 5 6 | hzar.AIC.default(maxLL, param.count)
hzar.AICc.default(maxLL, param.count, nObs)
hzar.AIC.hzar.cline(cline)
hzar.AICc.hzar.cline(cline,nObs)
hzar.AIC.hzar.dataGroup(dataGroup)
hzar.AICc.hzar.dataGroup(dataGroup)
|
maxLL |
The maximum log likelihood value. |
param.count |
The number of free parameters, also known as the number of degrees of freedom. |
nObs |
The number of samples observed. |
cline |
A |
dataGroup |
A |
The formula for AIC used is 2 * (param.count - maxLL).
The formula for AICc used is: AIC + 2 * param.count * (param.count + 1) / (nObs - param.count - 1)
The AIC or AICc score calculated.
Graham Derryberry asterion@alum.mit.edu
AIC
hzar.AIC.hzar.obsDataGroup
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | print(hzar.AIC.default(-8,3))
print(hzar.AICc.default(-8,3,30))
data(manakinMolecular);
mknAdaA <-
hzar.doMolecularData1DPops(manakinMolecular$distance,
manakinMolecular$ada.A,
manakinMolecular$ada.nSamples);
hzar.plot.obsData(mknAdaA);
mknAdaAmodel <-
hzar.makeCline1DFreq(mknAdaA, scaling="fixed",tails="none");
mknAdaAmodel <-
hzar.model.addBoxReq(mknAdaAmodel,-30,600);
mknAdaAmodelFitR <-
hzar.first.fitRequest.old.ML(model=mknAdaAmodel ,
mknAdaA,
verbose=FALSE);
print(hzar.AIC.hzar.dataGroup(hzar.fit2DataGroup(mknAdaAmodelFitR)))
mknAdaAcline <- hzar.gen.cline(list(center=300,width=10),
mknAdaAmodelFitR);
print(hzar.AIC.hzar.cline(mknAdaAcline));
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.