rmst | R Documentation |
RMST difference of 2 arms
rmst(
data,
tau = 10,
var_label_tte = "tte",
var_label_event = "event",
var_label_group = "treatment",
formula = NULL,
reference = "control",
alpha = 0.05
)
data |
A time-to-event dataset with a column |
tau |
RMST analysis time. |
var_label_tte |
Column name of the TTE variable. |
var_label_event |
Column name of the event variable. |
var_label_group |
Column name of the grouping variable. |
formula |
(default: |
reference |
A group label indicating the reference group. |
alpha |
Type I error. |
The argument formula
is provided as a convenience to easily specify the
TTE, event, and grouping variables using the syntax Surv(tte, event) ~ group)
. Surv()
is from the {survival} package (survival::Surv()
).
You can also explicitly
name the arguments passed to Surv()
, for example the following is
equivalent Surv(event = event, time = tte) ~ group)
. Note however that the
function Surv()
is never actually executed. Similarly, any other functions
applied in the formula are also ignored, thus you shouldn't apply any
transformation functions such as log()
since these will have no effect.
The z statistics.
data(ex1_delayed_effect)
rmst(
data = ex1_delayed_effect,
var_label_tte = "month",
var_label_event = "evntd",
var_label_group = "trt",
tau = 10,
reference = "0"
)
# Formula interface
rmst(
data = ex1_delayed_effect,
formula = Surv(month, evntd) ~ trt,
tau = 10,
reference = "0"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.