jglmm_tidiers: Tidying methods for jglmm models

jglmm_tidiersR Documentation

Tidying methods for jglmm models

Description

These methods tidy the coefficients and fitted values from 'jglmm' objects.

Usage

## S3 method for class 'jglmm'
glance(x, ...)

## S3 method for class 'jglmm'
tidy(x, ...)

## S3 method for class 'jglmm'
augment(x, ...)

Arguments

x

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

...

Optional additional arguments, currently none are used.

Value

'glance' returns a data frame with one row and the columns:

'tidy' returns a data frame with one row for each estimated effect. It contains the columns:

effect

"fixed" for fixed effects, "ran_pars" for random effect parameters

group

the group within which the random effect is being estimated (NA for fixed effects)

param

parameter being estimated (beta for fixed effects, sd or cor for random effect parameters)

term

term being estimated

estimate

estimated coefficient

std.error

standard error

statistic

z-statistic (NA for modes)

p.value

p-value computed from z-statistic (NA for modes)

'augment' returns one row for each original observation, with these columns added:

.fitted

predicted values

.resid

residuals

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)
tidy(gm)
augment(gm)
glance(gm)

## End(Not run)

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