make_random_formula: Generate random effects formula for stacked data

View source: R/fit_mmm.R

make_random_formulaR Documentation

Generate random effects formula for stacked data

Description

Takes a list of covariates for the random slopes. Each element of the list are the random slopes for a pairwise model

Usage

make_random_formula(id, covars = NULL)

Arguments

id

a character value with the name of the vector of subject identifiers.

covars

a list of character vectors with the covariates names

Value

a list with the fixed formulas for the pairwise model fitting stage.

Examples

# Random intercept at subject level
random <- make_random_formula(id = "id")

# Add random slopes
## Not run: 
random <- make_random_formula(id = "id", covars = "time")

## End(Not run)

JanvandenBrand/jmmm documentation built on May 30, 2022, 9:37 a.m.