family.galamm: Extract family or families from fitted galamm

View source: R/family.R

family.galammR Documentation

Extract family or families from fitted galamm

Description

This function returns a list of families for an object of class galamm, returned from galamm.

Usage

## S3 method for class 'galamm'
family(object, ...)

Arguments

object

An object of class galamm returned from galamm.

...

Optional arguments passed on to other methods. Currently not used.

Value

A list of family objects.

See Also

galamm()

Other details of model fit: VarCorr(), coef.galamm(), confint.galamm(), deviance.galamm(), factor_loadings.galamm(), fitted.galamm(), fixef(), formula.galamm(), llikAIC(), logLik.galamm(), nobs.galamm(), predict.galamm(), print.VarCorr.galamm(), ranef.galamm(), residuals.galamm(), sigma.galamm(), vcov.galamm()

Examples

# Mixed response model
loading_matrix <- matrix(c(1, NA), ncol = 1)
families <- c(gaussian, binomial)
family_mapping <- ifelse(mresp$itemgroup == "a", 1, 2)

mixed_resp <- galamm(
  formula = y ~ x + (0 + level | id),
  data = mresp,
  family = families,
  family_mapping = family_mapping,
  load.var = "itemgroup",
  lambda = loading_matrix,
  factor = "level"
)

# This model has two family objects
family(mixed_resp)


galamm documentation built on June 22, 2024, 12:19 p.m.