aic.calc {spind} | R Documentation |
Akaike Information Criterion with correction for sample size
Description
Calculates AIC and AICc
Usage
aic.calc(formula, family, data, mu, n.eff = NULL)
Arguments
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 |
Value
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
Author(s)
Gudrun Carl, Sam Levin
Examples
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
[Package spind version 2.2.1 Index]