Tutorials › Nonlinear Mixed-Effects Models (NLME) › Plug-In Simulation at the Population Parameter Estimates

Simulation From Fitted Models · Tutorial 678 of 797

Plug-In Simulation at the Population Parameter Estimates

Use fitted population parameter estimates to generate model-based prediction profiles, while distinguishing these plug-in outputs from population distributions and uncertainty-aware simulations.

Intermediate 10 min read

What You'll Learn

  • Define a plug-in prediction using fitted population parameter estimates.
  • Calculate concentrations over time and across covariate scenarios from a fitted model.
  • Explain why fixed-parameter plug-in profiles are reproducible rather than random.
  • Distinguish a zero-random-effect prediction from a marginal population mean.
  • Identify parameter uncertainty, between-subject variability, and residual error omitted by a basic plug-in profile.
  • Check units, model inputs, and extrapolation when interpreting simulated profiles.

What a Plug-In Simulation Produces

A fitted NLME model can be evaluated under a proposed dose, covariate pattern, and observation schedule to produce a model-based profile. In a plug-in simulation at the population parameter estimates, the estimated fixed effects are inserted into the model and held fixed. Evaluating the model at successive times or scenarios creates a profile, but repeating the same calculation with the same inputs gives the same values.

That reproducibility is useful: it makes the model's fitted structural predictions easy to inspect and compare across regimens or covariate values. It is also important to name the result carefully. A profile calculated at fixed effects alone is not automatically a distribution of outcomes in a population. In particular, it does not by itself include uncertainty in the estimated parameters, between-subject random effects, or residual error.

Definition: Let \(f(t,x,D;\theta,b)\) denote the model's structural prediction at time \(t\), covariates \(x\), and dosing input \(D\), for fixed-effect parameters \(\theta\) and subject random effects \(b\). A plug-in fixed-effects profile evaluates the model at fitted estimates \(\hat{\theta}\), holding them fixed. When random effects are set to zero, the profile is \(f(t,x,D;\hat{\theta},0)\). This is a zero-random-effect prediction; it is not generally the same as the marginal population mean \(E_b[f(t,x,D;\hat{\theta},b)]\).

The distinction between these quantities matters because NLME models describe several sources of variation. The plug-in calculation substitutes estimates for unknown fixed effects; it does not draw alternative plausible parameter values. Setting \(b=0\), when that is the chosen prediction, gives the model's structural output at the reference random-effect value. It does not average predictions over the random-effects distribution. Nor does a structural prediction include observation-level residual error unless that error is deliberately added in a separate step.

Model, Inputs, and Assumptions

Consider a simple hypothetical one-compartment concentration model after an intravenous bolus. Let \(C(t)\) be concentration in mg/L, \(D\) the dose in mg, \(V\) volume in L, and \(CL\) clearance in L/h. With first-order elimination, the structural prediction is

$$ C(t)=\frac{D}{V}\exp\left(-\frac{CL\,t}{V}\right). $$

Suppose clearance depends on body weight \(w\) through \(CL(w)=CL_{70}(w/70)^{0.75}\), where \(CL_{70}\) is clearance at 70 kg. In the examples, all values are hypothetical. The plug-in calculation uses \(D=420\) mg, \(V=42\) L, and fitted estimates \(\widehat{CL}_{70}=5.2\) L/h and \(\hat{V}=42\) L. These estimates are treated as fixed inputs for the calculations.

The profile is meaningful only relative to its model and inputs. Here, the equation assumes an instantaneous intravenous dose, a one-compartment disposition structure, and first-order elimination over the time range considered. The units are compatible: \(D/V\) is mg/L, while \(CL\,t/V\) is dimensionless because \((\mathrm{L/h})(\mathrm{h})/\mathrm{L}=1\). A different route, dosing history, or structural model would require the corresponding model equation and inputs rather than reuse of this one.

Worked Example: A Plug-In Concentration at 70 kg

Calculate the predicted concentration 4 h after the hypothetical 420 mg bolus for a 70 kg subject, using the fitted estimates above and setting the random effect to zero.

At 70 kg, the covariate multiplier is \((70/70)^{0.75}=1\), so the clearance substituted into the model is \(5.2\) L/h. The initial concentration is \(420/42=10\) mg/L. Therefore,

$$ \begin{aligned} \hat{C}(4;70) &=\frac{420}{42}\exp\left(-\frac{5.2\times4}{42}\right)\\ &=10\exp(-0.495238)\\ &\approx 6.094\ \text{mg/L}. \end{aligned} $$

This is the model's fixed-effects prediction at the specified weight and time. It is not a measured concentration, and the calculation does not express how much concentrations might vary among subjects or how uncertain the fitted estimates are.

Calculating Profiles Across Scenarios

A plug-in profile is obtained by evaluating the same fitted model for each desired time or scenario. The estimates remain fixed; the inputs such as time, weight, or dose change. This makes it straightforward to compare model predictions under controlled changes, provided each scenario is within a range where the model and its covariate relationships are credible.

Worked Example: Comparing Two Weights

Calculate the predicted concentration at 4 h for hypothetical subjects weighing 60 kg and 80 kg. Use the same 420 mg dose, \(V=42\) L, and clearance relationship.

For 60 kg, the fitted clearance at that weight is \(5.2(60/70)^{0.75}\approx4.63226\) L/h. Substituting the unrounded clearance into the concentration equation gives

$$ \begin{aligned} \hat{C}(4;60) &=10\exp\left[-\frac{5.2(60/70)^{0.75}\times4}{42}\right]\\ &=10\exp(-0.44117)\\ &\approx 6.433\ \text{mg/L}. \end{aligned} $$

For 80 kg, \(5.2(80/70)^{0.75}\approx5.74774\) L/h. Thus,

$$ \begin{aligned} \hat{C}(4;80) &=10\exp\left[-\frac{5.2(80/70)^{0.75}\times4}{42}\right]\\ &=10\exp(-0.54740)\\ &\approx 5.784\ \text{mg/L}. \end{aligned} $$

Under this model and these fixed estimates, the predicted 4 h concentration is lower at 80 kg than at 60 kg. The calculation compares model-based predictions, not observed groups or causal effects. Its interpretation depends on the specified weight-clearance relationship and on applying it at weights supported by the data used to fit the model.

Worked Example: Building a Time Profile and Changing the Dose

For the 70 kg scenario, calculate the predicted concentrations at 2, 4, and 8 h after 420 mg. Then determine the 4 h prediction for a 600 mg bolus, holding the fitted parameters fixed.

At 70 kg, clearance is 5.2 L/h. The initial concentration for 420 mg is \(420/42=10\) mg/L. Evaluating the equation at each time gives:

$$ \begin{aligned} \hat{C}(2;70)&=10\exp\left(-\frac{5.2\times2}{42}\right) \approx 7.807\ \text{mg/L},\\ \hat{C}(4;70)&=10\exp\left(-\frac{5.2\times4}{42}\right) \approx 6.094\ \text{mg/L},\\ \hat{C}(8;70)&=10\exp\left(-\frac{5.2\times8}{42}\right) \approx 3.714\ \text{mg/L}. \end{aligned} $$

The successive values form a declining plug-in profile for this dose and scenario. For a 600 mg bolus, the initial concentration is \(600/42\approx14.2857\) mg/L. The 4 h prediction is therefore

$$ \hat{C}(4;70,600) =\frac{600}{42}\exp\left(-\frac{5.2\times4}{42}\right) \approx 8.706\ \text{mg/L}. $$

The dose change scales the initial concentration, while the elimination rate in this model remains unchanged. This profile comparison assumes the same model and fixed estimates apply to both doses; it does not establish that the model is appropriate at a new dose level.

Why Fixed Effects Alone Do Not Give a Population Distribution

It is tempting to interpret a zero-random-effect profile as the average concentration in the population. That interpretation is generally unjustified in a nonlinear model. Even if a random effect \(b\) has mean zero, averaging the model output over \(b\) need not give the output at \(b=0\). A short Taylor expansion shows why.

For a scalar random effect with mean zero and variance \(\omega^2\), expand \(f\) around zero, holding other inputs fixed. To second order,

$$ f(b)\approx f(0)+f'(0)b+\frac{1}{2}f''(0)b^2. $$

Taking expectations and using \(E(b)=0\) and \(E(b^2)=\omega^2\) gives

$$ E_b[f(b)]\approx f(0)+\frac{1}{2}f''(0)\omega^2. $$

Unless the curvature term is zero (or negligible), the marginal mean differs from the zero-random-effect prediction. The approximation is a local justification, not an exact formula for every NLME model. It establishes the key point: in a nonlinear model, substituting a reference random-effect value is not generally equivalent to averaging predictions across the random-effects distribution.

There is a separate omission: plug-in estimates are uncertain because they were estimated from finite data. Holding \(\hat{\theta}\) fixed does not account for that estimation uncertainty. A profile may therefore look smooth and precise while still being uncertain as a prediction. Parameter uncertainty, random-effect variability, and residual error answer different questions; they should not be treated as interchangeable sources of spread.

Checks, Alternatives, and Limitations

Before interpreting a plug-in profile, verify the calculation and its scope. Check that units agree, the dosing history and time origin are correct, the covariates are in the units and coding expected by the model, and the output is in the intended quantity. Compare the profile with the fitted data and model diagnostics available for the relevant range. Predictions far outside observed covariate or dose support rely more heavily on the model's functional form and should be described as extrapolations.

A useful diagnostic is to recompute a few points independently, including a simple reference case such as \(t=0\), for which this model gives \(C(0)=D/V\). If a purported plug-in profile changes between runs despite identical inputs and estimates, some quantity is being varied or randomly generated; the calculation is no longer solely the deterministic evaluation described here. Conversely, identical repeated outputs do not demonstrate that the model is correct or that individual outcomes are identical.

ApproachWhat changes or is averaged?What the result is suited to describe
Fixed-effects plug-in profileEvaluates the model at fixed fitted estimates and specified inputsStructural prediction under a stated scenario
Random-effects population calculationAccounts for variation in subject effects and, for a population mean, averages predictions over their distributionPopulation heterogeneity or a marginal population prediction
Parameter-uncertainty calculationAllows fitted parameter values to vary according to an uncertainty representationUncertainty in predictions due to estimating model parameters
Observation-level simulationAdds a residual observation model to a structural predictionVariation in simulated measured outcomes, conditional on the chosen model components

These alternatives are not substitutes for one another: each targets a different quantity. A fixed-effects plug-in profile is often a useful first calculation because its inputs and structural consequences are transparent. Its limitations are equally important. It does not, by itself, provide prediction intervals, subject-level distributions, or simulated observed data. Those require additional model components and simulation choices, which should be stated rather than silently implied.

Common Mistakes

  • Calling the plug-in profile “the population mean.” A prediction at \(b=0\) is generally not the average of predictions over random effects in a nonlinear model. Name it as a zero-random-effect or fixed-effects prediction unless an appropriate population averaging calculation was made.
  • Reading a smooth curve as evidence of low uncertainty. The curve is smooth because the same fitted estimates are used at every point. Smoothness does not account for estimation uncertainty or subject variability.
  • Assuming a simulation must be random. Evaluating a structural model on a grid is a deterministic simulation. Random draws are needed only when the target quantity calls for simulated variability or uncertainty.
  • Rounding intermediate values too early. Retain full precision for intermediate calculations, then round the final output. Small rounding differences can otherwise alter the reported concentration.
  • Extrapolating without qualification. The model will return a numerical value for many inputs, but a computed value outside data support is not automatically reliable.
Key takeaway: A plug-in simulation evaluates a fitted model at fixed population parameter estimates under specified inputs. It provides a reproducible structural prediction, not a complete representation of parameter uncertainty, between-subject variability, or residual observation error.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. In the hypothetical bolus model, what is the 70 kg prediction at time zero after a 420 mg dose? What does this calculation assume?
  2. Why can \(f(t,x,D;\hat{\theta},0)\) differ from the marginal mean \(E_b[f(t,x,D;\hat{\theta},b)]\), even when the random effect has mean zero?
  3. A fixed-effects profile gives the same value on 100 repeated evaluations. Does this show that 100 simulated subjects would have identical concentrations? Explain.
  4. Name two checks to make before interpreting a plug-in profile at a new covariate or dose value.

Solutions. (1) At time zero, \(C(0)=D/V=420/42=10\) mg/L, assuming the stated instantaneous intravenous bolus and volume model. (2) Nonlinearity means averaging model outputs is generally different from evaluating the model at the average random effect; curvature can make the two quantities differ. (3) No. Repeating the same deterministic evaluation gives the same structural prediction, but it does not generate subject random effects or residual error and says nothing about variation among subjects. (4) Check that the input units, dosing history, and covariate coding match the model, and assess whether the new value is within the data-supported range; also verify that the model is suitable for the proposed scenario.