From Randomized Regimen to Simulated Outcome
A trial design determines which regimens participants can receive and how those regimens are assigned. A simulation must carry that assignment through to exposure and outcome: each participant receives a randomized regimen, has an exposure generated under that regimen, and then has an outcome generated under the specified exposure-response model. Skipping any link can make the simulated comparison represent a different trial from the one intended.
The focus here is generating participant-level exposure and outcome data under competing designs. The exposure-response relationship is an input to the simulation, not something established by the simulation itself. In particular, a simulated association between exposure and outcome does not show that changing an individual’s exposure would cause the predicted change in outcome.
Specify the Exposure and Outcome Models
Begin by defining the exposure metric that the response model uses. It might be a concentration summary or another model-derived quantity, but it must have a consistent definition and units across regimens. A dose schedule does not itself equal an exposure: a pharmacokinetic model or an explicit regimen-to-exposure mapping is needed to obtain the typical exposure for each schedule.
For a transparent example, let \(C_i\) be participant \(i\)’s exposure metric and let \(a_i\) be the regimen assigned to that participant. Suppose the typical exposure under regimen \(a\) is \(m_a\), and individual exposure varies lognormally around that value:
The subtraction of \(\tau^2/2\) makes \(m_a\) the arithmetic mean exposure, because \(E[\exp(\eta_i-\tau^2/2)]=1\). The log-scale standard deviation \(\tau\) describes between-participant exposure variability in this simplified model. This distribution assumes positive exposure and a common log-scale variability across regimens. In an application, the exposure distribution should reflect the stated pharmacokinetic model and any covariate or correlated variability assumptions.
Now suppose a continuous outcome \(Y_i\), measured in points, follows a linear exposure-response model:
Here \(\mu_0\) is the expected outcome at zero exposure and \(Z_i\) is a centered participant characteristic included in the model. The coefficient \(\beta\) has units of outcome points per exposure unit; \(\gamma\) has units of outcome points per unit of \(Z_i\). This version assumes the residual \(\epsilon_i\) is independent of exposure and \(Z_i\), conditional on the model inputs, and that the conditional residual variance is constant. Those assumptions are illustrative, not universal. If the specified outcome model is nonlinear, use that model instead of substituting its average exposure into a linear formula.
For a placebo regimen, set \(C_i=0\) if that is the model’s intended placebo exposure. If placebo outcomes include other treatment or background effects, those must be represented in the outcome model rather than silently attributed to drug exposure.
Why Individual Exposure Must Be Propagated
The simulation should generally generate \(C_i\) for each participant and then generate \(Y_i\) conditional on that value. The exposure distribution affects both the mean and the spread of outcomes. Under the example lognormal exposure model and linear outcome model, if \(Z_i=0\) and the residual is independent of exposure, then:
The mean uses the arithmetic mean exposure \(m_a\). The variance includes both exposure-driven outcome variation and residual variation. If \(Z_i\) is random, its contribution and any covariance with exposure must also be included; it cannot be discarded merely because the variable was centered.
For a nonlinear response function \(g\), the average outcome is generally \(E[g(C_i)]\), not \(g(E[C_i])\). Replacing every individual’s exposure by the regimen mean can therefore change the simulated mean as well as the variability. Individual-level propagation is particularly important when the response is nonlinear, when exposure variation is large, or when outcomes depend on exposure thresholds.
Worked Example: Generating Exposure and Outcome for One Participant
Suppose a hypothetical regimen has mean exposure \(m_a=4.00\) mg·h/L, the log-scale standard deviation is \(\tau=0.30\), and a simulated participant has \(\eta_i=0.20\). Use the linear outcome model \(Y_i=50-2C_i+\epsilon_i\), with \(\epsilon_i=-1.00\) point.
First calculate the individual exposure. Since \(\tau^2/2=0.30^2/2=0.0450\),
Then substitute that exposure and the residual draw into the outcome equation:
The coefficient \(-2\) means that, under this specified model, one additional mg·h/L of exposure corresponds to a 2-point lower conditional mean outcome. It does not make this simulated participant’s exposure a randomized assignment.
Represent the Randomization Scheme
Randomization must be implemented as specified by the trial design. Under complete randomization with fixed arm sizes, for example, the simulation assigns exactly those numbers of participants to each arm, with assignments permuted at random. Under block randomization, assignments must follow the stated block structure. If randomization is stratified, assignment is conducted within the specified strata. These schemes do not produce interchangeable assignment patterns in a finite trial.
Draw participant characteristics from the intended population and preserve any specified dependence among them.
Apply the design’s allocation ratio, fixed arm sizes, blocks, strata, or other specified assignment rule.
Use the assigned dose and schedule to select the regimen-specific exposure model, then draw participant-level variability.
Apply the specified response model, participant characteristics, and residual variation to each participant.
A shared sequence of virtual participants can be useful when comparing designs, but each design must still receive assignments generated under its own randomization rule. Reusing the same assignment labels across designs when their allocation schemes differ would not simulate either design faithfully.
Worked Example: Comparing Two Schedules Through Their Exposure Inputs
Consider two hypothetical schedules with the same nominal weekly dose. A specified pharmacokinetic model predicts mean trough exposures of \(3.00\) mg/L for Schedule A and \(2.20\) mg/L for Schedule B. Suppose the response is \(Y=50-2C+\epsilon\), where \(C\) is trough exposure in mg/L and \(E(\epsilon)=0\).
The predicted mean outcomes under this model are:
Thus the model predicts a 1.60-point difference in mean outcome, with Schedule A lower, because its specified mean trough exposure is higher and the response slope is negative. This calculation is conditional on the supplied schedule-specific exposure predictions and the response model. Equal nominal weekly doses alone do not imply equal trough exposure or equal outcomes. A full simulation would additionally draw individual exposures around each schedule’s mean and residual outcomes for each randomized participant.
Worked Comparison of Competing Designs
The following small hypothetical simulation illustrates how randomization changes which outcomes are generated and compared. Use \(Y_i=50-2C_i+\epsilon_i\), with exposure in mg·h/L and outcome in points. Design A randomizes six participants equally to low and high dose. Design B randomizes four to placebo and two to high dose. The displayed exposures and residuals are hypothetical simulation draws, not observed study data.
Worked Example: Applying Two Randomization Schemes
For Design A, suppose the randomly assigned groups and generated values are:
| Assigned regimen | Exposure \(C_i\) (mg·h/L) | Residual \(\epsilon_i\) (points) | Outcome calculation | Outcome (points) |
|---|---|---|---|---|
| Low | 1.80 | 1.00 | 50 − 2(1.80) + 1.00 | 47.4 |
| Low | 2.20 | −1.00 | 50 − 2(2.20) − 1.00 | 44.6 |
| Low | 2.00 | 0.00 | 50 − 2(2.00) | 46.0 |
| High | 3.60 | 1.00 | 50 − 2(3.60) + 1.00 | 43.8 |
| High | 4.40 | −1.00 | 50 − 2(4.40) − 1.00 | 40.2 |
| High | 4.00 | 0.00 | 50 − 2(4.00) | 42.0 |
The low-dose mean is \((47.4+44.6+46.0)/3=46.0\) points. The high-dose mean is \((43.8+40.2+42.0)/3=42.0\) points. The simulated high-minus-low contrast is \(42.0-46.0=-4.00\) points.
For Design B, the assignment rule gives four placebo participants and two high-dose participants. Suppose their simulated placebo outcomes are \(51.0,\ 49.0,\ 50.0,\ 48.0\) points, with \(C_i=0\), and their high-dose outcomes are \(43.8\) and \(40.2\) points, as in the table. The placebo mean is \(49.5\) points; the high-dose mean is \(42.0\) points. The simulated high-minus-placebo contrast is \(42.0-49.5=-7.50\) points.
The two contrasts answer different questions: Design A compares high with low dose, while Design B compares high dose with placebo. Their numerical difference in this single set of draws is not evidence that one design is better. Design choice concerns the intended comparisons and the distribution of results across repeated simulated trials, not a favorable realization selected after the fact.
Diagnostics, Alternatives, and Limitations
Before interpreting simulated outcomes, check that the implementation matches the model and design. Useful checks include confirming that every participant has exactly one randomized assignment; arm counts or block totals match the randomization rule; exposures are positive and use the intended units; and exposure distributions have the intended regimen-specific means and variability. For the lognormal model above, the simulated average exposure across many draws should approach \(m_a\), and its variance should approach \(m_a^2(e^{\tau^2}-1)\). Outcome checks should verify that the response equation uses each participant’s own exposure and that residual draws have the specified distribution.
Common warning signs include identical exposures for all participants despite a specified variability model, a regimen’s simulated mean exposure differing systematically from its input, treatment-arm counts that violate fixed allocation, or outcome means inconsistent with the stated response equation. Such discrepancies may reflect coding errors, a mismatch between the exposure metric and its units, or random variation in a small simulated sample. A check should distinguish an expected finite-sample fluctuation from a structural implementation mistake.
| Approach | What it represents | Main caution |
|---|---|---|
| Generate participant-level exposure, then outcome | Exposure variability propagated through the specified response model | Requires a defensible exposure distribution and correctly implemented dependence assumptions |
| Use regimen mean exposure for every participant | A deterministic exposure approximation | Removes exposure-driven variability and can misstate the mean under nonlinear response |
| Generate outcomes directly by assigned regimen | A reduced-form regimen-to-outcome model | Does not represent individual exposure-response links unless those are encoded in its assumptions |
A simulation is conditional on its inputs. It does not repair an incorrect exposure model, an implausible response relationship, or an unsuitable population distribution. It also does not establish that a randomized dose effect equals the effect of intervening on an individual’s measured exposure: exposure is post-randomization and may vary with participant characteristics. Use the assignment rule for trial comparisons, and describe exposure-response interpretations as conditional on the stated model.
Check Your Understanding
Work through each question, then compare your reasoning with the solutions below.
- If \(C_i=m_a\exp(\eta_i-\tau^2/2)\), what is \(E(C_i\mid a)\), and why is the subtraction term needed?
- Under \(Y_i=50-2C_i+\epsilon_i\), a participant has \(C_i=3.00\) mg·h/L and \(\epsilon_i=0.50\) point. Calculate the outcome.
- Why must a simulation with fixed 2:1 allocation assign arm labels according to that allocation rather than independently assigning each participant with probability one-half?
- For a nonlinear response \(g(C)\), why might using only mean exposure produce a different mean outcome from simulating individual exposures?
Solutions. (1) The mean is \(m_a\), since \(E[\exp(\eta_i-\tau^2/2)]=1\) for \(\eta_i\sim N(0,\tau^2)\); the subtraction centers the lognormal draw to the intended arithmetic mean. (2) \(Y_i=50-2(3.00)+0.50=44.5\) points. (3) Independent one-half assignments do not enforce a 2:1 allocation and can generate arm sizes inconsistent with the design. (4) In general, the mean response is \(E[g(C)]\), which need not equal \(g(E[C])\); exposure variability can therefore affect the average response as well as its spread.