Description Usage Arguments Value Examples
View source: R/formula-parser.R
Creates formulas for all possible combinations of variables provided to the function. All terms can appear as linear terms or non-linear terms.
1 | create_formulas(num_vars, cat_vars, lhs, fname = NULL)
|
num_vars |
A character vector of covariates on numeric scale. |
cat_vars |
A character vector of categorical covariates |
lhs |
The left-hand side of the formula to be produced. |
fname |
A string of the special function in which |
A vector of formula strings for possible (and correct) model specifications given the variables provided.
1 2 3 4 5 6 7 | create_formulas(num_vars = c("x1", "x2"), lhs = "Surv(time, status) ~")
create_formulas(num_vars = c("x1", "x2"), cat_vars = c("z1"),
lhs = "Surv(time, status) ~")
create_formulas(num_vars = c("x1"), cat_vars = c("z1", "pspline(x2)"),
lhs = "Surv(time, status) ~")
create_formulas(num_vars = c("x1", "x2"), cat_vars = c("z1"),
lhs = "Surv(time, status) ~", fname = "psline")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.