uvsurv.Rd
uvsurv
takes lists of continuous and/or categorical variables.
For continuous variables, coxph
returns HR (95% CI) and
log-rank p-values. For categorical variables, coxph
returns
HR (95% CI) and log-rank p-values and survfit
produces median
survival (95% CI) and a survival estimate at a specified time. Results
are put into a table suitable for printing in a WordR Markdown
file.
uvsurv(contvars, catvars, event, time, test, dat, strata = NULL, cuminc = FALSE)
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 survival event indicator (needs to be in quotes) |
time | is the survival time variable (needs to be in quotes) |
test | is the timepoint you would like to estimate, in whatever units the survival time is in |
dat | is the dataset to use 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" |
cuminc | if TRUE allows you to get the estimates at specified timepoint on cumulative incidence scale (i.e. 1 - KM) rather than survival scale. Defaults to FALSE. |
Returns a dataframe