data(colonCS, package = "condSURV")
# multiple asymptotic tests
out <- RMST.test(formula = "Stime ~ rx",
event = "event",
data = colonCS,
hyp_mat = "Tukey",
tau = 3000,
method = "asymptotic")
summary(out)
plot(out)
## or, equivalently,
out <- RMST.test(time = colonCS$Stime,
status = colonCS$event,
group = colonCS$rx,
hyp_mat = "Tukey",
tau = 3000,
method = "asymptotic")
summary(out)
plot(out)
## an example for a crossed two-way design
out_tw <- RMST.test(formula = "Stime ~ rx * sex",
event = "event",
data = colonCS,
hyp_mat = "Tukey",
tau = 3000,
method = "asymptotic")
summary(out_tw)
plot(out_tw)
# \donttest{
# multiple groupwise bootstrap tests
# this may take a few seconds
out_gw <- RMST.test(formula = "Stime ~ rx",
event = "event",
data = colonCS,
hyp_mat = "Tukey",
tau = 3000,
method = "groupwise")
summary(out_gw)
plot(out_gw)
# multiple permutation tests
# this may take a few seconds
out_perm <- RMST.test(formula = "Stime ~ rx",
event = "event",
data = colonCS,
hyp_mat = "Tukey",
tau = 3000,
method = "permutation")
summary(out_perm)
plot(out_perm)
# }
Run the code above in your browser using DataLab