rmst_two_arm | R Documentation |
Calculate RMST difference
rmst_two_arm(
time_var,
event_var,
group_var,
trunc_time,
reference = sort(unique(group_var))[1],
alpha = 0.05
)
time_var |
A numeric vector of follow up time. |
event_var |
A numeric or integer vector of the status indicator; 0=alive 1=event. |
group_var |
A vector of treatment groups. |
trunc_time |
A numeric vector of pre-defined cut-off time point(s). |
reference |
Group name of reference group for RMST comparison. Default is the first group name by alphabetical order. |
alpha |
A numeric value of the significant level for RMST confidence interval. Default is 0.05. |
A list of 2 data frames of RMST calculations:
rmst_per_arm
: the calculation results per group.
rmst_diff
: the calculation results of RMST differences.
data(ex1_delayed_effect)
with(
ex1_delayed_effect,
simtrial:::rmst_two_arm(
time_var = month,
event_var = evntd,
group_var = trt,
trunc_time = 6,
reference = "0",
alpha = 0.05
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.