knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(eventPred)
We analyzed interim event data from the interimData2 dataset within the eventPred package. As of the cutoff date of October 1, 2020, all 300 patients had been enrolled, and 183 patients had experienced the event of interest (with a target of 200 events).
A Weibull distribution was employed to model the time to event incorporating a factor covariate with three levels. An exponential distribution was used to model the time to dropout.
set.seed(2000) df = interimData2 df$agegrp = as.factor(sample(c(1,2,3), nrow(df), replace = TRUE, prob = c(0.3, 0.6, 0.1))) pred <- getPrediction( df = df, to_predict = "event only", target_d = 200, event_model = "weibull", covariates_event = "agegrp", dropout_model = "exponential", pilevel = 0.90, nyears = 1, nreps = 500)
The median predicted date to reach 200 events is March 1, 2021. The 90% prediction interval for event completion ranges from January 13, 2021 to May 13, 2021. The negligible impact of baseline covariate inclusion on the results aligns with its random generation and lack of association with the time to event distribution.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.