# \donttest{
set.seed(100)
# Weibull and Weibull, different means and medians.
n <- 1e3
# Generate data.
df1 <- GenData(n = n, dist = "weibull", theta = c(1, 1), p = 0.2)
df1$arm <- 1
df0 <- GenData(n = n, dist = "weibull", theta = c(1, 2), p = 0.2)
df0$arm <- 0
data <- rbind(df1, df0)
# Comparison.
comp <- CompParaSurv(data, dist1 = "weibull")
# Add RMST at time 1.
comp <- CompParaSurv(data, dist1 = "weibull", tau = 1)
# Calculate permutation p-values (slow).
comp <- CompParaSurv(data, dist1 = "weibull", tau = 1, reps = 100)
# }
Run the code above in your browser using DataLab