Skip to contents

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.

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)
#> [[1]]
#> 
#> Family: gaussian 
#> Link function: identity 
#> 
#> 
#> [[2]]
#> 
#> Family: binomial 
#> Link function: logit 
#> 
#>