uvcrr takes lists of continuous and/or categorical variables, runs a univariable crr 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.

uvcrr(contvars, catvars, event, time, dat)

Arguments

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

Value

Returns a dataframe. If there are warnings or errors from crr then blank rows are returned.

Details

uvcrr uses all function defaults to crr. For example, the failure code is set to 1. See the help file for crr for additional details.