aic.calc | R Documentation |
Calculates AIC and AICc
aic.calc(formula, family, data, mu, n.eff = NULL)
formula |
A model formula |
family |
Family used to fit the model. |
data |
A data frame |
mu |
Fitted values from a model |
n.eff |
Effective number of observations. Default is NULL |
A list with the following components
loglik
Log likelihood of the model
df
Degrees of freedom
AIC
AIC score for the specified model
AICc
AIC score corrected for small sample sizes
Gudrun Carl, Sam Levin
data(musdata)
coords <- musdata[ ,4:5]
mglm <- glm(musculus ~ pollution + exposure, "poisson", musdata)
aic <- aic.calc(musculus ~ pollution + exposure, "poisson", musdata,
mglm$fitted)
aic$AIC
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.