# Quick example with subset of data and fewer bootstraps
data(data_risk)
data_subset <- data_risk[1:100, ] # Use first 100 rows for speed
complete_cases <- complete.cases(data_subset)
data_clean <- data_subset[complete_cases, ]
y <- data_clean$outcome
x1 <- data_clean$baseline
x2 <- data_clean$new
t <- c(0, 0.19, 1)
output <- CI.raplot(x1, x2, y, t, conf.level = 0.95, n.boot = 10, dp = 2)
# \donttest{
# Full dataset example with more bootstraps
data(data_risk)
complete_cases <- complete.cases(data_risk)
data_clean <- data_risk[complete_cases, ]
y <- data_clean$outcome
x1 <- data_clean$baseline
x2 <- data_clean$new
t <- c(0, 0.19, 1)
output <- CI.raplot(x1, x2, y, t, conf.level = 0.95, n.boot = 1000, dp = 2)
# }
Run the code above in your browser using DataLab