Learn R Programming

galamm (version 0.2.2)

family.galamm: 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 galamm
family(object, ...)

Value

A list of family objects.

Arguments

object

An object of class galamm returned from galamm.

...

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

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(), response(), sigma.galamm(), vcov.galamm()

Examples

Run this code
# 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)

Run the code above in your browser using DataLab