View source: R/sim_outcome_glmm.R
sim_outcome_glmm | R Documentation |
Simulate a (multivariate) longitudinal outcome
sim_outcome_glmm( data, formula, reg_coefs, resid_sd = NULL, ranef_vcov, type = "gaussian", return_ranefs = FALSE, seed = NULL, ... )
data |
a |
formula |
a list of model formulas for the longitudinal outcomes |
reg_coefs |
a named list of regression coefficients for
each model, with names equal to the corresponding response
variable. Each of the list elements is a (named) vector.
If named, the names will be matched with the names of the
design matrix that is created from |
resid_sd |
named vector of residual standard deviations, with names equal to the corresponding response variable (for types "gaussian" and "Gamma") |
ranef_vcov |
a random effects variance-covariance matrix or a named list of such matrices when there are more than two levels (and names being equal to the grouping variables) |
type |
named vector of model types. Available model types are "gaussian", "binomial", "Gamma", and "poisson". |
return_ranefs |
logical; should the random effects be returned?
If |
seed |
the seed value |
... |
arguments passed to other functions |
# Bivariate outcome in a multi-level setting
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.