Skip to main content

Table 1 The algorithm for simulation of patient recruitment and randomization

From: Selecting a randomization method for a multi-center clinical trial with stochastic recruitment considerations

Step 1

Specify the parameters of the trial (see subsection “Simulation Study setup”): \(T, {a}^{{\prime}}, {a}^{{\prime}{\prime}},b, n, N, G, \alpha ,\beta\)  

Step 2

Generate the recruitment rates for the centers: λi Gamma (α, β), i = 1, …, N

Step 3

For the \(\ell\)th simulation run (\(\ell=1,\dots ,\mathrm{10,000}\)):

a. For the \(i\)th center (\(i=1,\dots ,N\)):

 • Generate center activation time:\({u}_{i}\sim Uniform({a}^{\prime},{a}^{{\prime}{\prime}})\)  

 • Generate\(n\)patient arrival times according to the Poisson process with rate\({\lambda }_{i}\)

 • Record the patient arrival times as\(\left({u}_{i}+{t}_{i1}\right)\le \left({u}_{i}+{t}_{i2}\right)\le \dots \le ({u}_{i}+{t}_{in})\)

b. Create a data structure of the pooled sample of \(nN\) virtual patients with the following variables:

 • Patient ID (\(l=1,\dots ,nN\))

 • Patient enrollment time (\({\tau }_{l}={u}_{i}+{t}_{im}\),\(i=1,\dots ,N\),\(m=1,\dots ,n\))

 • Enrollment center

 • Geographic region of the center

c. Sort the data structure from Step 3b by \({\tau }_{l}\), and retain the first \(n\) patients \(\Rightarrow\) call the resulting dataset \({\mathcal{F}}_{n}\) \(\Rightarrow\)it will constitute the sample of \(n\) patients to be randomized in the \(\ell\)th simulation run

d. Based on \({\mathcal{F}}_{n}\) from Step 3c, for each considered randomization design, generate:

 • Randomization sequence\({{\varvec{\Delta}}}_{n}=({\delta }_{1},\dots ,{\delta }_{n})\), where \({\delta }_{m}=1\) or 0, if the \(m\)th patient in the sequence is randomized to treatment E or C

 • Vector\({{\varvec{\Phi}}}_{n}=({\phi }_{1},\dots ,{\phi }_{n})\), where\({\phi }_{m}\) is the conditional randomization probability of randomizing the \(m\)th patient in the sequence to treatment E

Step 4

Based on\(\mathrm{10,000}\)simulation runs, derive the operating characteristics, as described in subsection “Measures of balance and randomness”)