Extract formula from fitted galamm object
Usage
# S3 method for class 'galamm'
formula(x, ...)Arguments
- x
Object of class
galammreturned fromgalamm.- ...
Optional arguments passed on to other methods. Currently not used.
See also
Other details of model fit:
VarCorr(),
coef.galamm(),
confint.galamm(),
deviance.galamm(),
factor_loadings.galamm(),
family.galamm(),
fitted.galamm(),
fixef(),
llikAIC(),
logLik.galamm(),
nobs.galamm(),
predict.galamm(),
print.VarCorr.galamm(),
ranef.galamm(),
residuals.galamm(),
response(),
sigma.galamm(),
vcov.galamm()
Examples
# Mixed response model ------------------------------------------------------
# The mresp dataset contains a mix of binomial and Gaussian responses.
# We need to estimate a factor loading which scales the two response types.
loading_matrix <- matrix(c(1, NA), ncol = 1)
# Define mapping to families.
families <- gfam(list(gaussian, binomial))
# Fit the model
mod <- galamm(
formula = y ~ x + (0 + level | id),
data = mresp,
family = families,
factor = "level",
load_var = "itemgroup",
lambda = loading_matrix
)
# Formula
formula(mod)
#> y ~ x + (0 + level | id)
