{'fraction_non_alphanumeric': 0.03378919576374262, 'fraction_numerical': 0.006348452935417841, 'mean_word_length': 4.472402597402597, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Advanced models for predicting event occurrence in event-driven clinical trials accounting for patient dropout, cure and ongoing recruitment

We consider event-driven clinical trials, where the analysis is performed once a pre-determined number of clinical events has been reached. For example, these events could be progression in oncology or a stroke in cardiovascular trials. At the interim stage, one of the main tasks is predicting the number of events over time and the time to reach specific milestones, where we need to account for events that may occur not only in patients already recruited and are followed-up but also in patients yet to be recruited. Therefore, in such trials we need to model patient recruitment and event counts together. In the paper we develop a new analytic approach which accounts for the opportunity of patients to be cured, as well as for them to dropout and be lost to follow-up. Recruitment is modelled using a Poisson-gamma model developed in previous publications. When considering the occurrence of events, we assume that the time to the main event and the time to dropout are independent random variables, and we have developed a few advanced models with cure using exponential, Weibull and log-normal distributions. This technique is supported by well developed, tested and documented software. The results are illustrated using simulation and a real dataset with reference to the developed software.


Introduction
An important aspect of event-driven trials is the operational design at the initial and interim stages, i.e. predicting the event counts over time and the time to reach specific milestones, accounting for events that may occur not only in patients already recruited and are followed-up but also in patients yet to be recruited. Therefore, in event-driven trials we need to model patient recruitment and event counts together.
There are different techniques for recruitment modelling described in the literature and one of the main directions is using mixed Poisson models. This direction has a long history, with several papers devoted to the use of Poisson processes with fixed recruitment rates to describe the recruitment process (Carter et al., [16]; Senn [17,18]). However, in real clinical trials the recruitment rates in different centres vary. Therefore, to model this variation, Anisimov and Fedorov [1] introduced a Poisson-gamma model, where the variation in rates in different centres is modelled using a gamma distribution (see also Anisimov [3]). Some applications to real trials are considered in Anisimov et al. [2]. This technique was developed further in several publications for predicting and interim re-forecasting the recruitment process under various conditions Anisimov [4,8]. Other approaches to recruitment modelling primarily deal with global recruitment. These approaches use different techniques and we refer interested readers to survey papers by Barnard et al. [11]; Heitjan et al. [15]) and Gkioni et al. [14], and also to a discussion paper Anisimov [7] on using Poisson models with random parameters with other references therein.
A larger number of clinical trials are event-driven where the number of clinical events is required to be large enough to allow for reliable statistical conclusions about the parameters of patient responses. For such trials, one of the main tasks is predicting not only the required number of recruited patients, but also the number of events that may occur and the time to reach particular milestones. A useful review of different approaches for event-driven trials is provided in Heitjan et al. [15]. However, for predicting the number of events over time and the time to stop the trial, the authors of papers cited primarily use a Monte Carlo simulation technique, e.g. Bagiella and Heitjan [10]. Therefore, Anisimov [5] developed an analytic methodology for predictive modelling the event counts together with patient recruitment in ongoing event-driven trials accounting also for patient dropout. This methodology is developed further to forecasting multiple events at start-up and interim stages under exponential assumptions, Anisimov [8], and predicting some operational characteristics during follow-up times, Anisimov [6].
It is also of interest in event-driven trials that a number of patients under treatment will not experience the event within their exposure time (i.e. time from randomisation to a particular milestone) as the therapy of different diseases is improving. Therefore, an interesting direction is to investigate the opportunity of cure. Here we note the paper by Chen [13], but he also uses a simulation technique for predicting event timing and does not consider the case of patient dropout.
Therefore, in the paper we developed a new analytic approach to this problem which accounts for patient dropout and also for the opportunity for patients to be cured with some probability.
We assume that the patient recruitment is modelled using a Poisson-gamma model developed in Anisimov and Fedorov [1], Anisimov [4]. We consider non-repeated events and assume that the times to the main event and to dropout are independent random variables, and there is an opportunity of cure. Several new models have been developed using exponential, Weibull and log-normal distributions. The focus is on the interim stage, where the parameters of different models are estimated using maximum likelihood technique. The predictive distributions of the number of future events for all considered models are derived in the closed forms, thus, Monte Carlo simulation is not required.
The developed technique and R-tools allow for forecasting the event counts over time and also the time to stop the trial with mean and predictive bounds. The results are illustrated in the paper using Monte Carlo simulation and the real dataset.
The paper is organised as follows: Section 2, the basic models for the process of event occurrence; Section 3, predicting event counts for patients at risk; Section 4, predicting event counts accounting for ongoing recruitment; Section 5, testing of the Weibull model with cure using Monte Carlo simulation; Section 6, software development and an R-package; Section 7, implementation to a real clinical trial, and; Section 8, fitting models to real data.

Modelling the process of event occurrence
Consider a trial at some interim time t 1 and assume that there is one type of non-repeated events: the main event of interest A, and the patients also can be lost to follow-up (call it dropout).
Then all patients that were recruited in the trial until a given interim time can be divided into three groups: 1) group A: patients experienced event A. Denote by n A the total number of patients in this group and by {x k } the lengths of follow-up periods from randomisation date until the event; 2) group O: each patient is censored at interim time, thus the patients have neither experienced an event nor are they lost to follow-up. Denote by n O the total number of patients, and by {z i } the lengths of follow-up periods from randomisation date until interim time; 3) group L: patients are lost to follow-up. Denote by n L the total number of patients, and by {y j } the lengths of follow-up periods until censoring by dropout.
Consider now the following cure model describing the process of event occurrence for every patient.
Assume that after randomisation, the patient can be either cured with some probability r, or with probability 1 − r can experience event A after some random time τ A . If a patient is cured, then event A cannot occur.
Denote time to dropout τ L , and if event A doesn't occur before τ L , the patient experiences dropout regardless of whether this patient is cured or not (in this case event A cannot occur).
Assume that the events for different patients occur independently and the times τ A and τ L are also independent random variables with cumulative distribution functions (CDF) F A (x) and F L (x), respectively. Suppose that F A (x), F L (x) and probability of cure r are the same for all patients, though potentially we can consider different treatment groups with different parameters. Assume also that these functions are continuously differentiable and denote by f A (x) and f L (x) the corresponding probability density functions (pdf).

Estimating parameters of the model
Consider maximum likelihood method. Denote for convenience, For a patient in group O with exposure time z i , the probability that event A and dropout will not occur is For a patient in group A with exposure time x k , the probability that event A occurs in a small interval ( For a patient in group L with exposure time y j , the probability that dropout occurs in a small interval (y j , y j + dy) Given data, the maximum likelihood function has the form Correspondingly, the log-likelihood function is For different types of distributions this expression will have a different form.

Exponential with cure model
This model assumes that the variables τ A and τ L are exponentially distributed with rates µ A and µ L respectively. This is a three parameter model: (µ A , µ L , r). The log-likelihood function: Consider equating the partial derivatives of the log-likelihood function to zero to find a relationship between parameters. Partial derivatives are: Equating the last derivative to zero, we get that Substituting into relation (1) we get a simpler relation depending only on two variables (µ A , r): To find the estimators, optimisation is carried out by maximising the log-likelihood function. Initial values are set as µ A (0) = n A Σ1 and r(0) taken to be some range of values in (0, 1). In optimisation, new variables (θ 1 , θ 2 ) are considered: After optimisation, the variables are transformed back to the original parameters.

Weibull with cure model
By definition, the pdf and CDF of a Weibull distribution are where (α, b) are shape and scale parameters. For ease of notation, we use the parametrisation g = 1/b α . Then pdf and CDF have the form Weibull with cure model assumes that the variables τ A and τ L have Weibull distribution with parameters (α A , g A ) and (α L , g L ) respectively. This is a five parameter model: (α A , g A , α L , g L , r). The log-likelihood function: Optimisation is carried out in the same way as for the exponential model, with initial values: Similar relations can be written for the combination of the distributions, e.g. Weibull distribution for time to event τ A and exponential distribution for time to dropout τ L , and vice versa.
Note that the Weibull model is in some sense a generalisation of the exponential model. Indeed, if in particular in the relations above we fix the value α A = 1, then we get the combined exponential-Weibull with cure model (time to event τ A has an exponential distribution). By setting both values, α A = 1 and α L = 1, we get the exponential with cure model.
In a similar way the log-likelihood function can be derived also for a log-normal with cure model.

Predicting event counts for patients at risk
Let us introduce for convenience the time of the occurrence of event A, ν A , so P(ν A ≤ z) = (1 − r)F A (z). Note that if r > 0, then ν A is an improper random variable as P(ν A < +∞) = 1 − r < 1.
Consider a conditional probability for a patient in group O to experience an event in the future time interval [t 1 , t 1 + x] given that the follow-up period until the interim time t 1 is z: For the exponential model p A (x, z) can be calculated in a closed form: Note that for the exponential model, if , so this expression does not depend on z and we have a memoryless property. However, for r > 0, the memoryless property is lost.
For the Weibull with cure model p A (x, z) has the following form: where To compute this function in applications we can use a numerical integration.
Similar relations can be written for the combination of the distributions, and also for a log-normal with cure model.

Global prediction
Assume now that the recruitment of new patients is already completed, thus, the events in the future may occur only in patients at risk in group O. Denote by can be represented in the form: where the variables Br(p A (t, z k )) are independent and the probability p A (t, z) is defined above in Section 3 and depends on the type of the distributions used in the event model.
For a rather large number of patients in group O, (> 20), we can apply a normal approximation for the process R O (t 1 , t, {z k }) using simple formulae for the mean and the variance: Then For a not so large number of patients, a distribution of R O (t 1 , t, {z k }) can be calculated numerically as a convolution of the sum of Bernoulli variables.
Let us evaluate the predictive distribution for the time to reach a given target K for the total planned number of events in the study.
Recall that in previous notation n A denotes the total number of events that occurred prior to interim time t 1 (size of group A). The remaining number of events that are left to achieve is Let τ (t 1 , K R ) be the remaining time to reach K R events after the interim time t 1 . Then the following relation holds: for any t > 0, can be evaluated for any time t, this relation allows us to calculate also the distribution of τ (t 1 , K R ).
Consider the calculation of PoS (probability to complete study before a planned time t 1 +T ). Denote it as If we use a normal approximation for the process R O (t 1 , T, (z k )), then where Φ(x) is the CDF of a standard normal distribution.

Predicting event counts accounting for ongoing recruitment
Consider now the situation when at the interim time the planned number of patients to be recruited is not reached yet, that means, the recruitment is still ongoing. In this case we need also to predict the future recruitment and how many events may occur for patients to be recruited in the future.

Modelling and predicting patient recruitment
Assume that patients arrive at clinical centres according to Poisson processes with some rates λ i . To model the variation in the rates among different centres we assume that λ i are jointly independent gamma distributed random variables with parameters (α, β) (shape and rate) and pdf where Γ(α) is a gamma function.
This model is called a Poisson-gamma (PG) recruitment model and was developed in Anisimov & Fedorov [1] and further extended in Anisimov [3,4,8].
Denote by Π a (t) a standard Poisson process with rate a and by Π(a) a random variable which has a Poisson distribution with parameter a. Then a mixed Poisson process Π λ (t) where the rate λ is gamma distributed with parameters (α, β) is a PG process (Bernardo and Smith [12]) with parameters (t, α, β): Note that for a mixed Poisson process with random rate λ, Assume now that some centre is active only in time interval [u, b]. Denote by d(t, u, b) the duration of recruitment window (duration of active recruitment) in a centre up to time t: Assume that the recruitment rate in this centre is λ which is gamma distributed with some parameters. Then the recruitment process in this centre for any t > 0 can be represented as a PG process with a cumulative rate λd(t, u, b). That means, the number of patients recruited in interval [0, t] has a mixed Poisson distribution with the rate λd(t, u, b).
Consider now predicting the remaining recruitment at some interim time t 1 . Assume for simplicity that all centres are active and in every centre i the following data are available: (v i , k i ) -the duration of active recruitment (recruitment window) and the number of patients recruited.
In Anisimov and Fedorov [1] (see also Anisimov[4]) it was developed a maximum likelihood technique for estimating parameters (α, β) of a PG model assuming that in all active centres the rates have a gamma distribution with the same parameters. In [4], the Bayesian technique was also developed for predicting future recruitment using the property that the posterior rate in a centre i, λ i , which is adjusted to the data in this centre, also has a gamma distribution with parameters (α + k i , β + v i ).
Consider now a given interim time t 1 . Let i be some active centre. Denote by (α, β) the parameters of a PG model estimated using data in all active centres as noted above. Then the future recruitment process in centre i can be modelled as a PG process with posterior recruitment rate λ i . Assume that the recruitment in this centre can be closed due to some operational reasons at some time t 1 + b i . Then for any t > 0 the recruitment process in centre i in time interval [t 1 , t 1 + t] can be represented as a PG process with a cumulative rate λ i d(t, 0, b i ).
Assume now that j is some new centre that is planned to be initiated at time t 1 + u j and let b j be the closing date of recruitment in this centre. Denote by λ j the recruitment rate in this centre. Note that the rates in the new centres can be provided by clinical teams using expert estimates or evaluated using historical data from similar trials.
Then centre j will be active only in time interval [t 1 + u j , t 1 + b j ]. Thus, for any t > 0, the recruitment process in time interval [t 1 , t 1 + t] can be represented as a PG process with a cumulative rate λ j d(t, u j , b j ).
Consider the prediction of the remaining global recruitment.
Denote by I Active a set of active centres with posterior rates λ i . Assume also that it can be some set I N ew of new centres that are planned to be initiated after interim time t 1 at times t 1 + u j , j ∈ I N ew . Denote by λ j the rates in the new centres. Then the predictive total number of patients n(t 1 , t 1 + t) to be recruited in the time interval [t 1 , t 1 + t] can be represented as This means, n(t 1 , t 1 + t) has a mixed Poisson distribution with a cumulative rate For a rather large number of centres, the predictive bounds for n(t 1 , t 1 + t) can be evaluated using a normal approximation, as the mean and the variance of n(t 1 , t 1 + t) can be easily calculated using the property (13) and relations In particular, the mean predicted time to reach a required remaining number of patients n R can be numerically calculated as the point when the line E[n(t 1 , t 1 + t)] hits level n R .
Note that for a not so large number of centres, for predicting n(t 1 , t 1 + t) one can use a PG approximation developed in Anisimov [8], Anisimov and Austin [9].

Predicting event counts
Consider now predicting event counts accounting for ongoing recruitment.
Denote by κ A the time it takes until event A occurs first (before dropout), and let p A (x) = P(κ A ≤ x), x > 0, be its CDF.
For cure model with dropout defined in Section 2, in previous notation, In particular, for the exponential with cure model, using notation µ = µ A + µ L , For Weibull model, using parametrisationθ = (α A , g A , α L , g L ), where Consider now one clinical centre. Assume that patients arrive according to a mixed Poisson process with possibly random rate λ. Assume also that the centre is active only in a fixed time interval [a, b]. In Anisimov [5,8] the following result is proved.
For the exponential model, the function q A (t, a, b) can be easy calculated. Consider the duration of recruitment window d(t, a, b) in a centre at time t defined in (14). Then, using parameters (r, µ A , µ L ), For Weibull Model with parameters (α A , g A , α L , g L , r), where W 1 (t,θ) is defined in (20). This function can be numerically calculated.
Similar relations in the integral form can be written for the combination of the distributions, and also for a log-normal with cure model.
These results form the basis for creating predictions of the event counts in any active centre and globally.

Global forecasting event counts at interim stage
Consider now forecasting the total number of events at some interim time t 1 .
Denote the times of initiation of new centres (if any) by {u i } and the times of closure for all centres by {b i }. In general it is assumed that centres will be closed for recruitment at the time when recruitment hits the recruitment target. Thus, in applications, we usually assume that b i ≡ T P red where T P red is the predicted mean remaining time to reach the recruitment target.

Theorem 4.2
The predictive total number of new events A, k(t 1 , t, A), that may occur in future time interval [t 1 , t 1 + t], can be represented as a convolution of two independent random variables: where according to (16), and R O (t 1 , t, {z k }) is the predictive number of events A in group O defined in (6), Section 3.1.
Here the function q A (t, a, b) is defined by (21) (for exponential and Weibull models we have the expressions (22) and (23), respectively). The first sum in (25) is taken across all active centres andλ i are the posterior rates defined in Section 4.1. and the second sum is taken across new centres.
Correspondingly, the probability to complete trial in time is where T R is the planned remaining time to complete the trial and ν R (A) is the remaining number of events left to achieve.
The proof follows from results of Lemmas 3.1, 4.1 and Section 4.1.
Note that the mean and the variance of the process Π(Σ(t, A)) can be calculated explicitly in terms of functions q A (·) and parameters of the rates.
As typically in real trials the number of centres is rather large, to create predictive bounds for k(t 1 , t, A) one can use a normal approximation. This technique is realised in R package (EventPrediction), see Section 6.

Monte Carlo simulation
Monte Carlo simulation was used to test each model's performance. We considered 1000 patients assuming uniform distribution of centre initiation over 6 months, and took the target number of events 550. At a specified cut-off date the model parameters were estimated using maximum likelihood estimation, see Section 2.1. Using these estimators, predictions of the future occurrence of events were created. For the Weibull model two different cases for the initial parameters were considered, a A < 1 and a A > 1, see Fig 1 and Fig 2 respectively.
In both cases, the model successfully predicts the trajectory of the number of events A with the real trajectory falling within the 90% predicted bounds. Furthermore, the parameters estimated at the cut-off time using maximum likelihood technique are close to the initial parameters showing an appropriate estimation.

Software development
In order to expose the event and recruitment prediction models (as detailed in the previous sections) to a large number of key stakeholders, an R package (EventPrediction) has been developed, tested and deployed to a centralised R server. The EventPrediction package allows a user to easily pass the data required (i.e. subject event data, centre level data and configuration) and return back key parameter estimates and predictions with bounds, for both events and recruitment.

R package design
R was chosen over other programming languages, and an R Package was developed over standalone R scripts, for a number of reasons, including: R has an easy to use and to setup testing framework; R ships with easy to use code coverage tools; R has a Comprehensive R Archive Network ("CRAN") set of packages that are easily accessible; R seamlessly integrates with GitLab (and other source control software); R allows for an Object Oriented ("OO") approach (i.e. S3, S4 and R6); and also, primarily, it is simply straightforward to develop, test, document and centrally deploy an R Package for key stakeholders to use.
R's S3 lightweight OO solution was a key design feature of the EventPrediction package, as using such an OO approach yields four main benefits: first, S3's simple to use OO benefit of polymorphism (aka in R as method dispatch); secondly, S3 gives the OO benefit of inheritance; thirdly, S3 is ubiquitously used by R contributors, easy to use and for others to comment; and fourthly, S3 is in accordance with the functional programming paradigm, when an object is passed into an S3 function it is not going to change (unlike full OO approaches like R6).

Good software engineering principles
Another major benefit of developing an R Package (and utilising R's OO approach) is to ensure adherence to good Software Engineering principles, with code that is at a minimum: reliable; easy to use; efficient; well tested, with tests traceable to requirements and/or design; well documented; and (importantly) easy to maintain. The EventPrediction package conforms to each of these key programming elements, not only because these are simply good Software Engineering practices, but also as the biotechnology sector is highly regulated and there is a requirement to document a number of Software Development Life Cycle ("SDLC") tasks in accordance with departmental, company and regulatory policies.

R package SDLC and platform architecture
Before the design, development and/or testing of any code was initiated, two further key platform architectural design decisions were made: first, GitLab was used for source control, continuous integration, documentation, vignettes, readme files and also as part of the full deployment process; and secondly, R Studio Server Pro was used for development and testing of code, a Docker Image with a physical R server on AWS.

Further R package design: function layers
With a large number of complex R scripts and source papers another design choice (primarily, to make the code easier to use and easier to maintain) was grouping the code into four layers using R's S3 OO approach. The four programming layers are as follows: Layer One: Highest Level: Main Exposed Application Programming Interface (API).
This level is exposed to the user and contains: S3 Classes (functions) that allow instantiation of the objects that contain the input data required and configuration; functions to predict events and recruitment; plotting and printing functionality; and key getter functions.

Layer Two: Second Level Functions.
This level is not exposed to the user and is simply used to dispatch to the third level functions based on the S3 configuration objects instantiated in Layer One.

Layer Three: Third Level Functions.
This level is not exposed to the user and contains the main set of controller code and does all of the hard work of the package.

Layer Four: Lowest Level Functions.
This level is not exposed to the user and contains a large number of complex R scripts/algorithms that have been developed and tested using Monte Carlo Simulation, as detailed in the previous section.

R package input data required
The following set of input data is required by the EventPrediction package to predict events and recruitment (if recruitment is ongoing), with each set of data instantiated using R's S3 approach (as detailed in the previous sections). This data is in accordance with how the key stakeholders produce their data, it is transformed into the values as described in the previous sections, such that: • analysis_time_days is the number of days from randomisation to either the event date T A or censoring date (i.e. the dropout date T L for subjects that have dropped out or the date used to censor at the cut off if a subject has not dropped out).
• censor_flag == 0 represents group A, a subject experienced event A.

Site recruitment data
• centre_actual_enrol represents the number of subjects recruited at the unique centre ID.
• centre_recruitment_window_days represents the actual duration of recruitment at the unique centre ID (not including any screening period). The centre is active only during this interval [a, b].

Configuration
The following key pieces of information are accepted by the EventPrediction package (with appropriate defaults) which are used to select the appropriate algorithms and to provide key modelling values: • distributions_to_use: A list detailing the distributions to model the dropouts and events: e.g. list(events = "Exponential", drop_outs = "Exponential") • target_number_of_events: The target number of events for the analysis to be predicted In order to help the key stakeholders with the operational planning of a clinical trial and to test the quality of the prediction, the EventPrediction package was used on several historic studies. The following is one such case study in a historical oncology clinical trial, using the data at a given interim time when recruitment had not completed. The task was to predict the future recruitment and event counts with bounds and compare the results with the real trajectory of the recruitment and the events that have already occurred in the past.
The event and centre data was provided in accordance with the package API's (as detailed in the previous section) along with a target number of events of 250 and patients sample size of 405. At the interim cut-off time the data for the study had the following recruitment and event status:

Plots and parameter estimates
Further, the EventPrediction package produced the following three key plots, along with key parameter estimates, for the key stakeholders to consume: 1) prediction of the remaining recruitment 2) prediction of the remaining number of events using exponential model 3) prediction of the remaining number of events using Weibull model   The actual number of days when the target number of patients was reached in this trial was 152 and the actual number of days when the planned number of events occurred is 244. As seen in the figures, the predictions were indeed very close to the actuals.

Predicting events when recruitment complete
We also considered the same case study as above, but at a later interim time when recruitment had completed. Therefore the task here was to predict the future event counts only.
As detailed in the previous section, this study has a target number of events of 250 and patients sample size of 405. At the interim cut-off time the data for the study had the following recruitment and event status:

Plots and parameter estimates
Further, the EventPrediction package produced the following two key plots, along with key parameter estimates, for the key stakeholders to consume: 1) prediction of the remaining number of events using exponential model 2) prediction of the remaining number of events using Weibull model   8 Fitting models to real data

Kaplan-Meier plots
To assess the model fit, we looked at the Kaplan-Meier (KM) curve for each interim dataset and compared these to the predicted survival functions for exponential and Weibull distributions. This provides a visualisation for model fit: the best fit model for the interim data will be the model which distribution best maps the KM curve. This is for the occurrence of events A and so will only inform of the best distribution for modelling events A. However, similar curves can be created to test the fit of dropout distribution.
The survival functions for exponential and Weibull models with cure are calculated using their respective estimated parameters, with formulae: Exponential: S(x, r, µ A ) = r + (1 − r) exp(−µ A x) Weibull: S(x, r, α A , b A ) = r + (1 − r) exp(−( x b A ) α A ) In Fig 8, one can see that the predicted survival functions for exponential and Weibull models are very close and both map the KM curve well.

AIC and BIC criteria
We also used Akaike information criterion (AIC) and Bayesian information criterion (BIC) to test which model best fits the real dataset. These are calculated by: where k = number of parameters in the model, n = total number of patients at interim time, LogLik = the log-likelihood from parameter estimation.
For the stopped recruitment case: The lower the AIC or BIC, the better the model fit. From the two tables above, one can see that the cure models show an improvement on the "no cure" model. The exponential (A) and Weibull (L) cure model is the best fit for the stopped recruitment dataset. By small margins, the values of criteria for ongoing recruitment suggest either the Weibull cure model or the exponential (A) and Weibull (L) cure model is best suited for the data.

Conclusions
We have developed a new analytic approach for the prediction of event counts in event-driven trials when recruitment is complete or ongoing. We use the exponential and Weibull models and account for patient dropout and opportunity of cure. Not only can we predict the future occurrence of events, but we can also predict any remaining recruitment, with mean and bounds, using the Poisson-gamma recruitment model. The developed results can be easily extended to the combined cure models using the combination of exponential and Weibull distributions for the time to event and the time to dropout and also to log-normal with cure model.
Using these novel advanced models and with access to real subject level and centre level data we are now able to address key business use cases for a number of key stakeholders in order to better forecast the operational design of event-driven clinical trials. Furthermore, by centralising an exposed R Package EventPrediction, utilising good software engineering principles, each of our key stakeholders have access to the package and can obtain plots, parameter estimates and predictions with bounds, without contacting the mathematical modellers nor the R package developer.
We have many opportunities for future improvements to the mathematical modelling and EventPrediction package. One of the major priorities is to evaluate the predictions against real clinical trial operational data to ensure the existing and any future models are as accurate as we found in testing on historical data. We are also looking to incorporate other statistical distributions for modelling time to both the main event and dropout.