Why Hold Covariates Fixed?
A simulation can answer different questions depending on what is held constant and what is allowed to vary. If the covariate values are known for a particular set of subjects, the target may be the range of outcomes those subjects could have under the fitted model. In that case, simulate outcomes for the specified profiles, while allowing the model’s subject-level random effects and residual error to vary as appropriate. Do not replace the known covariates with newly sampled values.
This is different from simulating a new population by first generating covariates and then generating outcomes conditional on them. The earlier material on sampling covariates for population simulations addresses that second target. Here, the covariate profiles are given and remain fixed across simulation replicates. The outcomes may vary across replicates because the model still represents variation not explained by those covariates.
Model and Assumptions
Write the fitted NLME model for subject \(i\) in general form as
Here \(x_i\) is the covariate profile held fixed, \(t_i\) denotes the relevant design conditions such as observation time, \(\theta\) is the fixed-effect parameter vector, \(\eta_i\) is the subject-level random-effect vector, and \(\epsilon_i\) is residual error. \(G\) and \(R\) denote the specified random-effect and residual distributions; their forms depend on the fitted model. For a simulation of typical predictions, use \(f(x_i,t_i;\theta,0)\) without adding residual error. For simulated observations, include \(\epsilon_i\).
A conditional simulation is appropriate when the covariate values and their definitions are known for the target subjects, the fitted model is suitable for those profiles, and the random-effect and residual distributions used in simulation are the intended sources of variation. For independent new subjects, random effects are drawn independently across subjects, using the fitted covariance structure. If the design has dependence between subjects, the simulation must preserve that dependence instead. Holding \(x_i\) fixed does not by itself imply that all other sources of variability are fixed.
Usually, the fitted parameter estimates \(\theta\), \(\Omega\), and residual parameters are held fixed when the goal is to represent process variability under the fitted model. If parameter uncertainty is also to be represented, that requires an additional parameter-draw step; it should be identified as a different source of variation rather than confused with covariate variation.
Generating Outcomes for Fixed Profiles
For each requested replicate, keep the covariate row attached to its subject or profile, draw random effects according to the model, calculate the model prediction, and—when observations are the target—draw residual error. Repeat without replacing the covariates. The resulting simulations estimate the model-implied outcome distribution conditional on the specified profiles.
Record each covariate profile and any design conditions, such as dose and observation time. Check units, coding, and whether values are within a range where the model is intended to be used.
For each simulated subject, draw \(\eta_i\) from the fitted random-effect distribution, retaining correlations specified by the model.
Evaluate \(f\) with the fixed covariates and the drawn random effects. Add a residual draw only when simulating observations.
Repeat the random draws while leaving the profiles unchanged. Summaries then describe simulated outcomes for that fixed design, under the fitted model.
Worked Example: A Simulated Concentration at a Fixed Weight
Suppose a hypothetical one-compartment model has typical clearance \(CL_{\mathrm{typ}}=5(WT/70)^{0.75}\) L/h, where \(WT\) is weight in kg, and individual clearance is \(CL_i=CL_{\mathrm{typ}}\exp(\eta_i)\), with \(\eta_i\sim N(0,0.2^2)\). For an IV bolus dose \(D=100\) mg and volume \(V=20\) L, the concentration prediction at time \(t\) is \(C_i(t)=(D/V)\exp(-CL_i t/V)\). For simulated observations, assume additive residual error \(\epsilon_i\sim N(0,0.3^2)\) mg/L, independent of \(\eta_i\).
Consider a fixed profile with \(WT=50\) kg and \(t=2\) h. Its typical clearance is
For one hypothetical random-effect draw \(\eta_i=0.100\), the individual clearance is \(CL_i=3.885\exp(0.100)\approx 4.294\) L/h. Therefore,
If the hypothetical residual draw is \(+0.200\) mg/L, the simulated observation is \(3.254+0.200=3.454\) mg/L. The weight remains 50 kg throughout: variability between replicates comes from new random-effect and residual draws, not from changing the subject’s weight. The values are illustrative draws, not observations from a real study.
Fixed-Profile Summaries Are Not Population Summaries
A summary over a fixed set answers a question about that set of profiles. It is not automatically an estimate of the mean outcome in a broader population. In particular, averaging typical predictions over fixed profiles is different from averaging over a population distribution of covariates. The distinction matters because the covariate-to-outcome function can be nonlinear and because the profile composition may not match the target population.
Worked Example: Averaging Typical Clearance Over Four Fixed Profiles
For the allometric model in the previous example, consider four hypothetical fixed profiles with weights 50, 70, 70, and 90 kg. Their typical clearances, rounded to three decimal places, are 3.885, 5.000, 5.000, and 6.037 L/h, respectively. The average typical clearance for this fixed set is
This number summarizes the four specified profiles’ typical clearances. It does not include random-effect or residual variation, and it does not describe a new population unless these profiles and their frequencies represent that population. To summarize simulated clearances including between-subject variation, draw \(\eta_i\) for each fixed profile and calculate \(CL_i\) before summarizing.
Worked Example: Comparing a Fixed Set With a New Covariate Mix
Suppose a second hypothetical target population has equal proportions of 50-kg and 90-kg subjects. The corresponding typical clearances are 3.885 and 6.037 L/h. The average typical clearance under this two-point covariate mix is
That is a different target from the four-profile fixed set, whose average was 4.981 L/h. The fixed set included two 70-kg profiles; the new mix does not. The difference arises from the covariate composition, not from any change in the fitted clearance relationship. If simulating the new population, one would generate covariates according to the specified 50/50 mix and then simulate outcomes conditional on each generated value. For the fixed set, one uses its listed profiles directly.
Why the Procedure Works—and What It Does Not Say
The justification follows directly from the conditional model. Once a covariate profile \(x_i\) is specified, the model defines an outcome distribution through its random effects and, for observations, its residual error. Repeated simulation approximates features of that distribution because the draws are generated from the distributions stated in the model.
This expression integrates over random effects while keeping \(x_i\) fixed. If residual error is part of the observation model, it is included in \(P(Y_i\mid x_i,\eta_i;\theta,\sigma)\). A simulation that instead samples \(X_i\) from a population distribution averages over both covariates and random effects, and therefore targets a different distribution. Holding covariates fixed does not mean conditioning on observed outcomes, nor does it automatically condition random effects on subject-specific data.
Diagnostics, Pitfalls, and Alternatives
A simulation can follow the algorithm exactly and still be misleading if its inputs or model assumptions are unsuitable. Before interpreting the results, check that profile values use the model’s units and coding, that all required covariates are present, and that profiles are not being silently changed between replicates. Inspect simulated outcomes for implausible values, unexpected transformations, or patterns that signal a mismatch between the model and the intended design. Extreme or unsupported covariate profiles deserve particular caution: the simulation is conditional on the model being applicable there; it does not validate extrapolation.
The main alternative is a population simulation that samples covariates before simulating outcomes. Use it when the target is a new or broader population and a covariate distribution is specified. Use fixed-covariate simulation when the target profiles are known, such as a planned design or a specified set of patients. A third choice is to simulate only typical predictions, without drawing subject effects or residual error, when the goal is the model’s central prediction rather than a distribution of individual outcomes.
- Mistake: “Known covariates mean no variability.” Covariates are fixed, but random effects and residual errors may still vary. The correction is to state which sources of variation are included in each simulation.
- Mistake: “The average over these profiles is the population average.” It is the average for this profile set, unless the set and its weights represent the target population. Use a specified covariate population distribution for a population target.
- Mistake: “Use each subject’s empirical Bayes estimate as a new-subject random-effect draw.” A conditional fixed-covariate simulation for new subjects ordinarily draws random effects from the population distribution. Subject-specific estimates use information from observed outcomes and represent a different conditioning target.
- Mistake: “A prediction is an observation.” A prediction without residual error omits observation-level noise. Include residual draws when simulated observations are required.
Fixed-covariate simulations are conditional on the supplied profiles and the fitted model. They do not account for uncertainty in the covariates themselves, guarantee that the model is valid at every profile, or represent uncertainty in estimated parameters unless that uncertainty is added deliberately.
Check Your Understanding
Answer each question before reading the solutions.
- In a fixed-covariate simulation, which quantities remain fixed, and which may still vary?
- A model predicts an outcome from weight and a subject random effect. What changes between replicates if weight is held fixed?
- For the four profiles with typical clearances 3.885, 5.000, 5.000, and 6.037 L/h, calculate the average and state what it summarizes.
- When should residual error be added to the model prediction?
- How does simulating a new covariate population change the target compared with holding profiles fixed?
Solutions. (1) Covariate profiles and specified design conditions remain fixed; random effects and, for simulated observations, residual errors may vary. (2) The random effect is newly drawn under the specified model, changing the individual parameter and resulting outcome; weight itself does not change. (3) The sum is \(19.922\) L/h, and \(19.922/4=4.9805\) L/h, which rounds to \(4.981\) L/h. It summarizes typical clearance for those four fixed profiles. (4) Add residual error when simulating observations that include observation-level variability, not when the target is only the model prediction. (5) Sampling covariates averages outcomes over a covariate distribution as well as over other simulated variability, so the result describes a population mix rather than only the supplied profiles.