library(survival)
example_data <-
tibble::tibble(
time = rpois(1000, 2) + 1,
status = rbinom(1000, 1, .5),
x = rpois(1000, .5),
covar = rbinom(1000, 1, .5)
)
example_data
make_big_model <- function() {
boop <- runif(1e6)
coxph(Surv(time, status) ~ x + strata(covar), example_data)
}
res <- make_big_model()
weigh(res)
weigh(butcher(res))
Run the code above in your browser using DataLab