logLik.gremlin: Methods to extract log-likelihood and information criterion... In gremlin: Mixed-Effects REML Incorporating Generalized Inverses

Description

Extracts the log-likelihood or AIC from a gremlin model fit.

Usage

 ```1 2 3 4 5 6 7``` ```## S3 method for class 'gremlin' logLik(object, ...) npar.gremlin(object) ## S3 method for class 'gremlin' AIC(object, ..., k = 2, fxdDf = FALSE) ```

Arguments

 `object` An object of `class` ‘gremlin’. `...` 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 `FALSE`.

Details

Function `npar.gremlin` returns an object with attributes `n.fxd` and `n.bndry` which give additional information about the parameters estimated and contributing to the overall `df` of the model. `n.fxd` returns the total number of parameters (No. fixed effects + No. (co)variance comonents) minus the number of parameters constrained to a certain value. Thus, `n.fxd` represents the number of parameters that can vary and, as a consequence, affect the log-likelihood.

The attribute `n.bndry` reports the number of parameters that were restrained to stay inside the boundaries of allowable parameter space (e.g., a variance that was not allowed to be negative).

Value

`numeric` values for the log-likelihood, the number of parameters estimated by the model (sum of fixed effects and random effect (co)variance components), and Akaike's Information Criterion.

Examples

 ```1 2 3``` ```grS <- gremlin(WWG11 ~ sex - 1, random = ~ sire, data = Mrode11) logLik(grS) AIC(grS) ```

gremlin documentation built on July 1, 2020, 10:22 p.m.