ranef.jglmm: Extract the modes of the random effects

View source: R/extract.R

ranef.jglmmR Documentation

Extract the modes of the random effects

Description

Extract the conditional modes of the random effects from a 'jglmm' object.

Usage

## S3 method for class 'jglmm'
ranef(object, ...)

Arguments

object

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

...

Optional additional arguments, currently none are used.

Value

A list of data frames, one for each grouping factor for the random effects. The number of rows in the data frame is the number of levels of the grouping factor. The number of columns is the dimension of the random effect associated with each level of the factor. Each of the data frames has an attribute called "postVar", which contains an array for each random-effects term with the variance-covariance matrices for each level of the grouping factor.

Examples

## Not run: 
jglmm_setup()
cbpp <- dplyr::mutate(lme4::cbpp, prop = incidence / size)
gm <- jglmm(prop ~ period + (1 | herd), data = cbpp, family = "binomial",
            weights = cbpp$size)
ranef(gm)

## End(Not run)

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