uvcoxph.Rduvcoxph takes lists of continuous and/or categorical variables, runs a univariable coxph model for
each, and puts the resulting HR (95% CI) and p-value into a table suitable for printing in a Word R Markdown
file.
uvcoxph(contvars, catvars, event, time, dat, strata = NULL)
| contvars | is a list of the continuous variables you want in the rows e.g. list('Age') |
|---|---|
| catvars | is a list of the categorical variables you want in the rows e.g. list('Gender','Race') |
| event | is the event indicator (needs to be in quotes) |
| time | is the survival time variables (needs to be in quotes) |
| dat | is the dataset for analysis |
| strata | is a possible strata term for use in calculating the log-rank p-values. Defaults to NULL. Entries should be in quotes, e.g. "Surgeon" |
Returns a dataframe. If there are warnings or errors from coxph then blank rows are returned.