extractAIC.jglmm: Extract AIC from a Fitted Model

View source: R/fit_stats.R

extractAIC.jglmmR Documentation

Extract AIC from a Fitted Model

Description

Extract AIC from a Fitted Model

Usage

## S3 method for class 'jglmm'
extractAIC(fit, scale = 0, k = 2, ...)

Arguments

fit

An object of class 'jglmm', as returned by 'jglmm'.

scale

Not currently used (see 'extractAIC' generic).

k

Numeric specifying the 'weight' of the degrees of freedom part in the AIC formula.

...

Optional additional arguments, currently none are used.

Value

A numeric vector of length 2, with first and second elements giving

‘df' the ’degrees of freedom' for the fitted model in 'x'.

'AIC' the (generalized) Akaike Information Criterion for the fitted model in 'x'.

Examples

## Not run: 
jglmm_setup()
lm1 <- jglmm(Reaction ~ Days + (Days | Subject), lme4::sleepstudy)
aic <- extractAIC(lm1)
bic <- extractAIC(lm1, k = log(nobs(lm1)))

## End(Not run)

mikabr/jglmm documentation built on Nov. 18, 2022, 1:32 a.m.