ff_formula {finalfit} | R Documentation |
Generate formula as character string
Description
Useful when passing finalfit dependent and explanatory lists to base R functions
Usage
ff_formula(dependent, explanatory, random_effect = NULL)
finalfit_formula(dependent, explanatory, random_effect = NULL)
Arguments
dependent |
Optional character vector: name(s) of depdendent variable(s). |
explanatory |
Optional character vector: name(s) of explanatory variable(s). |
random_effect |
Optional character vector: name(s) of random effect variable(s). |
Value
Character vector
Examples
explanatory = c("age", "nodes", "sex.factor", "obstruct.factor", "perfor.factor")
dependent = "mort_5yr"
ff_formula(dependent, explanatory)
explanatory = c("age", "nodes", "sex.factor", "obstruct.factor", "perfor.factor")
dependent = "mort_5yr"
random_effect = "(age.factor | hospital)"
ff_formula(dependent, explanatory)
[Package finalfit version 1.0.8 Index]