View source: R/create_model_formula.R
create_model_formulas | R Documentation |
Create model formulas
create_model_formulas( targets = outcomes, primary_covariate = primary, other_covariates = covariates, random_effects = "id_surgeon", interaction_term = NULL, mgcv = FALSE )
targets |
character vector of target variable names |
primary_covariate |
character string of the key predictor variable |
other_covariates |
character vector of other predictors |
random_effects |
names of the random effect variables. Default is id_surgeon. |
interaction_term |
a character vector |
mgcv |
logical. Convert random effects specification to mgcv style? Default is false. |
a list of model formulas
create_model_formulas( targets = c("severe_complication", "death_30d"), primary_covariate = 's(surgeon_years_experience, k = 5)', other_covariates = model_covariates, random_effects = c( 'procedure, surgeon_years_experience', 'id_surgeon', 'id_hospital', 'cpt_cd'), mgcv = F) # a glmm model for lme4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.