Description Usage Arguments Details Value Author(s) Examples
createFormulaList
returns a list of formulas with all
combinations of dependent and independent variables.
1 | createFormulaList(dependent, independent, covariates, interactions = NULL)
|
dependent |
A single or a vector of variables names that the
user wishes to use as dependent variables in an analysis;
|
independent |
Similar to |
covariates |
Confounders or covariates that would be included in all formulas and hence all models. Also must be a string/character. |
interactions |
Optional, include one variable from the
|
This function creates a list of formulas for use in a chain of processes. This function's goal is to create all combinations of a set of dependent, or outcome, variables with a set of independent, or exposure variables. Covariates and an interaction term can also be specified and included into the formula.
Outputs a list of formulas.
Luke W. Johnston
1 2 3 4 5 6 7 | outcomes <- c('Income', 'Education', 'Job')
exposures <- c('Age', 'Sex', 'Height', 'Race', 'IQ')
covariates <- c('ParentEdu', 'Country', 'City')
interactions <- 'City'
createFormulaList(outcomes, exposures, covariates)
createFormulaList(outcomes, exposures, covariates, interactions)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.