h_prep_survival_input | R Documentation |
Prepare Survival Input
h_prep_survival_input(formula, data, treatment)
formula |
( |
data |
( |
treatment |
( |
Note that formula
can also contain an externally defined survival::Surv
object. In this case, the time
and status
variables are extracted
and added to the data
input. Note that it is up to the user to ensure that in this
case the column binding is correct, i.e., that the rows of the data
match
with the rows of the Surv
object. In addition, the same named variables must not appear
in both the data
and the Surv
object, to avoid ambiguity (this is a difference
vs. the behavior of survival::coxph()
for better transparency).
A list containing the following elements:
data
: The potentially updated data set.
time
: Name of the time variable.
status
: Name of the status variable.
treatment
: Name of the treatment variable.
strata
: Name of the strata variable.
schema
: Randomization schema.
covariates
: Names of the covariates in the model.
model
: A formula only including the covariates, but not treatment or strata variables.
n_levels
: Number of treatment levels.
levels
: Names of the treatment levels.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.