Predicts enrollment and events at the design stage using assumed enrollment and treatment-specific time-to-event models, or at the analysis stage using blinded or unblinded data and specified enrollment and time-to-event models through simulations.
Kaifeng Lu, kaifenglu@gmail.com
Accurately predicting the date at which a target number
of subjects or events will be achieved is critical for the planning,
monitoring, and execution of clinical trials. The eventPred
package provides enrollment and event prediction capabilities
using assumed enrollment and treatment-specific time-to-event models
at the design stage, using blinded or unblinded data and
specified enrollment and time-to-event models at the analysis stage.
At the design stage, enrollment is often specified using a
piecewise Poisson process with a constant enrollment rate
during each specified time interval. At the analysis stage,
before enrollment completion, the eventPred
package
considers several models, including the homogeneous Poisson
model, the time-decay model with an enrollment
rate function lambda(t) = mu/delta*(1 - exp(-delta*t))
,
the B-spline model with the daily enrollment rate
lambda(t) = exp(B(t)*theta)
, and the piecewise Poisson model.
If prior information exists on the model parameters, it can
be combined with the likelihood to yield the posterior distribution.
The eventPred
package also offers several time-to-event models,
including exponential, Weibull, log-logistic, log-normal, piecewise
exponential, model averaging of Weibull and log-normal, and spline.
For time to dropout, the same set of model options are considered.
If enrollment is complete, ongoing subjects who have not had the event
of interest or dropped out of the study before the data cut contribute
additional events in the future. Their event times are generated
from the conditional distribution given that they have survived
at the data cut. For new subjects that need to be enrolled,
their enrollment time and event time can be generated from the
specified enrollment and time-to-event models with parameters
drawn from the posterior distribution. Time-to-dropout can be
generated in a similar fashion.
The eventPred
package displays the Akaike Information
Criterion (AIC), the Bayesian Information
Criterion (BIC) and a fitted curve overlaid with observed data
to help users select the most appropriate model for enrollment
and event prediction. Prediction intervals in the prediction plot
can be used to measure prediction uncertainty, and the simulated
enrollment and event data can be used for further data exploration.
The most useful function in the eventPred
package is
getPrediction
, which combines model fitting, data simulation,
and a summary of simulation results. Other functions perform
individual tasks and can be used to select an appropriate
prediction model.
The eventPred
package implements a model
parameterization that enhances the asymptotic normality of
parameter estimates. Specifically, the package utilizes the
following parameterization to achieve this goal:
Enrollment models
Poisson: theta = log(rate)
Time-decay: theta = c(log(mu), log(delta))
B-spline: no reparametrization is needed. The knots as considered fixed.
Piecewise Poisson: theta = log(rates)
.
The left endpoints of time intervals, denoted as
accrualTime
, are considered fixed.
Event or dropout models
Exponential: theta = log(rate)
Weibull: theta = c(log(scale), -log(shape))
Log-logistic: theta = c(log(scale), -log(shape))
Log-normal: theta = c(meanlog, log(sdlog))
Piecewise exponential: theta = log(rates)
.
The left endpoints of time intervals, denoted as
piecewiseSurvivalTime
for event model and
piecewiseDropoutTime
for dropout model, are
considered fixed.
Model averaging: theta = c(log(weibull$scale),
-log(weibull$shape), lnorm$meanlog, log(lnorm$sdlog))
.
The covariance matrix for theta
is structured
as a block diagonal matrix, with the upper-left block
corresponding to the Weibull component and the
lower-right block corresponding to the log-normal
component. In other words, the covariance matrix is
partitioned into two distinct blocks, with no
off-diagonal elements connecting the two components.
The weight assigned to the Weibull component, denoted as
w1
, is considered fixed.
Spline: theta
corresponds to the coefficients
of basis vectors. The knots
and scale
are considered fixed. The scale
can be hazard,
odds, or normal, corresponding to extensions of Weibull,
log-logistic, and log-normal distributions, respectively.
The eventPred
package uses days as its primary time unit.
If you need to convert enrollment or event rates per month to
rates per day, simply divide by 30.4375.
Emilia Bagiella and Daniel F. Heitjan. Predicting analysis times in randomized clinical trials. Stat in Med. 2001; 20:2055-2063.
Gui-shuang Ying and Daniel F. Heitjan. Weibull prediction of event times in clinical trials. Pharm Stat. 2008; 7:107-120.
Xiaoxi Zhang and Qi Long. Stochastic modeling and prediction for accrual in clinical trials. Stat in Med. 2010; 29:649-658.
Patrick Royston and Mahesh K. B. Parmar. Flexible parametric proportional-hazards and proportional-odds models for censored survival data, with application to prognostic modelling and estimation of treatment effects. Stat in Med. 2002; 21:2175-2197.