logLik.gremlin {gremlin} | R Documentation |
Extracts the log-likelihood or AIC from a gremlin model fit.
## S3 method for class 'gremlin' logLik(object, ...) ## S3 method for class 'gremlin' AIC(object, ..., k = 2, fxdDf = FALSE)
object |
An object of |
... |
Additional arguments. |
k |
A numeric value for the penalty per parameter. Default is 2, as in classic AIC. |
fxdDf |
A logical indicating whether to penalize according to the number
of fixed effect parameters. Since only models fit by REML can be compared,
these must always be the same and so become a constant. Hence, the default
is |
A numeric
value for either the log-likelihood and the number of
parameters estimated by the model (sum of fixed effects and random effect
(co)variance components) or Akaike's Information Criterion.
mod11 <- gremlinR(WWG11 ~ sex - 1, random = ~ calf, data = Mrode11, Gstart = matrix(0.1), Rstart = matrix(0.4), maxit = 50, v = 2, algit = "EM") logLik(mod11) AIC(mod11)