Tutorials › Nonlinear Mixed-Effects Models (NLME) › Sensitivity Equations for NLME Design Calculations

Study Design and Optimal Sampling for NLME · Tutorial 765 of 797

Sensitivity Equations for NLME Design Calculations

Learn to propagate parameter derivatives through NLME prediction models and use concentration gradients to construct and check local design information.

Advanced 12 min read

What You'll Learn

  • Define sensitivities of predicted concentrations with respect to fixed effects and individual parameters
  • Derive and solve sensitivity equations for parameter-dependent ODE models
  • Apply the chain rule through population-to-individual parameter mappings
  • Construct local conditional information from prediction gradients and residual variances
  • Check derivatives using finite differences with correctly perturbed initial conditions
  • Recognize when local sensitivity calculations do not represent full population information

Why Sensitivities Matter in Design

A concentration prediction answers what a model expects at a sampling time; a sensitivity answers how that prediction changes when a parameter changes. Design calculations use these derivatives to determine which planned observations carry information about which parameters. A concentration can be large yet only weakly informative about a parameter, or modest but highly responsive to it.

In a nonlinear mixed-effects model, an individual prediction depends on population fixed effects and on that individual's random effects. The derivative must therefore follow the complete path from a population parameter, through the individual parameter, through any differential-equation state, and finally to the predicted concentration. This tutorial develops that path and shows how to assemble the resulting derivatives into a local information matrix.

Definition: Let \(m(t;\theta,\eta)\) be a model-predicted concentration at time \(t\), where \(\theta\) is a vector of fixed effects and \(\eta\) is a vector of individual random effects. A sensitivity is a derivative of \(m\) with respect to a model parameter, such as \(\partial m/\partial\theta_j\) or \(\partial m/\partial\eta_k\), evaluated at specified parameter values. It gives the local rate of change in predicted concentration per unit change in that parameter.

Sensitivities are local: they describe change near the parameter values at which they are evaluated. They are not, by themselves, measures of uncertainty in a parameter or predictions of how a model will behave over a large parameter change. Design calculations also require a stated observation-error model and a clear distinction between conditional information for a given individual and information that accounts for the population distribution of random effects.

Derivatives Through an ODE Model

Many pharmacokinetic models define state variables \(x(t)\), such as amounts in compartments, through an ordinary differential equation. Write the model as

$$ \frac{dx(t)}{dt}=f(t,x(t),a), \qquad x(0)=x_0(a), $$

where \(a\) is a scalar parameter or a vector of parameters. The initial state may depend on \(a\), for example when the initial amount is calculated from a parameter-dependent dose or state transformation. A predicted concentration is written \(m(t)=g(t,x(t),a)\). Assume \(f\) and \(g\) have continuous first partial derivatives in the relevant state and parameter arguments locally, \(x_0(a)\) is differentiable, and the solution is unique and exists over the time interval of interest.

For a scalar parameter \(a\), define the state sensitivity \(S_a(t)=\partial x(t)/\partial a\). Differentiating the ODE with respect to \(a\) gives a second ODE:

$$ \frac{dS_a(t)}{dt} = f_x(t,x(t),a)S_a(t)+f_a(t,x(t),a), \qquad S_a(0)=\frac{\partial x_0(a)}{\partial a}. $$

Here \(f_x\) is the matrix of derivatives of \(f\) with respect to the state, and \(f_a\) is the derivative with respect to \(a\) while holding the state fixed. The predicted concentration sensitivity follows by the chain rule:

$$ \frac{\partial m(t)}{\partial a} = g_x(t,x(t),a)S_a(t)+g_a(t,x(t),a). $$

The first term accounts for the parameter's effect on the state trajectory; the second accounts for any direct effect on the observation function. For a vector of parameters, the same equations apply with one sensitivity column per parameter. If \(a\) enters through an individual parameter \(\psi=h(\theta,\eta)\), the derivatives of \(f\), \(x_0\), and \(g\) with respect to \(\theta\) or \(\eta\) must include the corresponding derivatives of \(h\).

Worked Example: A Parameter-Dependent Initial State

Consider the hypothetical one-state model \(\frac{dx}{dt}=-kx\), with initial condition \(x(0;k)=2(1+k\tau)\) mg/L, where \(\tau=1\) h and \(k\) is measured in \(\mathrm{h}^{-1}\). Find the sensitivity to \(k\) at \(t=2\) h when \(k=0.5\ \mathrm{h}^{-1}\). The initial state depends on \(k\), so its derivative must be included.

Here \(f=-kx\), so \(f_x=-k\), \(f_k=-x\), and \(S_k(0)=\partial x(0;k)/\partial k=2\tau=2\ \mathrm{mg}\cdot\mathrm{h}/\mathrm{L}\). The sensitivity equation is \(\frac{dS_k}{dt}=-kS_k-x\). The state solution is \(x(t)=2(1+k\tau)e^{-kt}\). Differentiating this solution, including its parameter-dependent initial value, gives

$$ S_k(t) = \left[2\tau-2(1+k\tau)t\right]e^{-kt}. $$

At \(k=0.5\ \mathrm{h}^{-1}\) and \(t=2\) h, \(x(0)=2(1+0.5)=3\) mg/L and \(x(2)=3e^{-1}=1.1036\) mg/L. The sensitivity is \(S_k(2)=[2-2(1.5)(2)]e^{-1}=-4/e=-1.4715\ \mathrm{mg}\cdot\mathrm{h}/\mathrm{L}\). A small increase in \(k\) near this value therefore decreases the predicted state at 2 h.

As a numerical check, use \(\delta=0.01\ \mathrm{h}^{-1}\) and recompute each prediction using its corresponding initial condition. At \(k=0.51\), \(x(0)=3.02\) mg/L and \(x(2)=3.02e^{-1.02}=1.0890\) mg/L. At \(k=0.49\), \(x(0)=2.98\) mg/L and \(x(2)=2.98e^{-0.98}=1.1184\) mg/L. Thus the central difference is \((1.0890-1.1184)/(0.02\ \mathrm{h}^{-1})\approx-1.470\ \mathrm{mg}\cdot\mathrm{h}/\mathrm{L}\), consistent with the sensitivity equation.

For dose events or other fixed-time state resets, sensitivities must also be propagated through the reset rule. If \(x^+=r(x^-,a)\), with event time fixed, then \(S_a^+=r_xS_a^-+r_a\). For example, adding a fixed dose to an amount state has \(r_a=0\) when differentiating with respect to a parameter that does not affect the dose. If event times or doses depend on a parameter, their effects must be included rather than silently held fixed.

From Individual Parameters to Fixed Effects

The derivatives used in design calculations depend on the parameterization. For example, suppose an individual clearance is \(\mathrm{CL}_i=\exp(\theta_{\mathrm{CL}}+\eta_i)\). Then \(\partial\mathrm{CL}_i/\partial\theta_{\mathrm{CL}}=\mathrm{CL}_i\) and \(\partial\mathrm{CL}_i/\partial\eta_i=\mathrm{CL}_i\). If the prediction is first differentiated with respect to \(\mathrm{CL}_i\), the chain rule gives

$$ \frac{\partial m}{\partial\theta_{\mathrm{CL}}} = \frac{\partial m}{\partial\mathrm{CL}_i}\mathrm{CL}_i, \qquad \frac{\partial m}{\partial\eta_i} = \frac{\partial m}{\partial\mathrm{CL}_i}\mathrm{CL}_i. $$

These equal derivatives apply to this specific log-linear mapping while holding the other model quantities fixed. Other mappings, such as a logistic transformation or a parameter depending on several random effects, have different chain-rule factors. A derivative with respect to a parameter on its natural scale is also not interchangeable with a derivative with respect to its logarithm.

Worked Example: Concentration Sensitivity on Log Scales

For a hypothetical one-compartment IV bolus model, let \(C(t)=D V^{-1}\exp(-\mathrm{CL}\,t/V)\), with \(D=100\) mg, \(\mathrm{CL}=10\) L/h, \(V=20\) L, and \(t=1\) h. The predicted concentration is \(C=5e^{-0.5}=3.0327\) mg/L. Define \(\theta_1=\log(\mathrm{CL})\) and \(\theta_2=\log(V)\), with logs understood relative to fixed units.

Since \(\partial\log C/\partial\theta_1=-\mathrm{CL}\,t/V\) and \(\partial\log C/\partial\theta_2=-1+\mathrm{CL}\,t/V\), multiplying each log-derivative by \(C\) gives the concentration derivatives:

$$ \frac{\partial C}{\partial\theta_1} = -0.5(3.0327) = -1.5163\ \mathrm{mg/L}, \qquad \frac{\partial C}{\partial\theta_2} = (-1+0.5)(3.0327) = -1.5163\ \mathrm{mg/L}. $$

At this time, a one-unit increase in either log parameter has the same local derivative, although the parameters have different meanings. On the natural clearance scale, \(\partial C/\partial\mathrm{CL}=(-1.5163)/(10)=-0.1516\) mg/L per (L/h). The scale and units must be reported with the derivative.

Constructing Local Design Information

Suppose a planned set of observations has mean vector \(\mu(a)\), where \(a\) is the parameter vector of interest, and errors are independent normal with known variances \(\sigma_j^2\), not depending on \(a\). Let \(J\) be the matrix whose \(j\)th row is the gradient of the predicted mean at observation \(j\). Under this model, the expected Fisher information for the mean parameters, conditional on the specified individual parameters, is

$$ \mathcal{I}(a)=J^\mathsf{T}R^{-1}J, \qquad R=\operatorname{diag}(\sigma_1^2,\ldots,\sigma_n^2). $$

Each observation contributes its sensitivity outer product weighted by its residual precision. This expression is local because \(J\) is evaluated at specified parameter values. It is conditional because the calculation treats an individual's parameters as given; it does not by itself integrate over random effects or provide full population-level information. If the residual variance depends on parameters, the information must also account for that variance dependence.

Worked Example: Combining Two Sampling Times

Continue the hypothetical IV bolus model above, with \(\theta=(\log\mathrm{CL},\log V)\), and plan samples at \(t=1\) h and \(t=4\) h. Assume independent additive normal residual errors with known standard deviation \(0.2\) mg/L at each time, and evaluate information at \(\mathrm{CL}=10\) L/h and \(V=20\) L. The error assumptions make \(R=0.04I\ (\mathrm{mg/L})^2\).

At 1 h, the sensitivity row is \((-1.5163,-1.5163)\) mg/L per log unit. At 4 h, \(C=5e^{-2}=0.6767\) mg/L, and \(\mathrm{CL}t/V=2\), so the row is \((-2(0.6767),(2-1)(0.6767))=(-1.3534,0.6767)\) mg/L per log unit. Therefore \(J\) is

$$ J= \begin{pmatrix} -1.5163 & -1.5163\\ -1.3534 & 0.6767 \end{pmatrix}, \qquad \mathcal{I}=J^\mathsf{T}\frac{1}{0.04}I J \approx \begin{pmatrix} 103.3 & 34.59\\ 34.59 & 68.93 \end{pmatrix}. $$

For instance, the first diagonal entry is \([(-1.5163)^2+(-1.3534)^2]/0.04\approx103.3\); the off-diagonal entry using the displayed rounded sensitivities is \([(-1.5163)(-1.5163)+(-1.3534)(0.6767)]/0.04\approx34.58\); using unrounded sensitivities gives 34.59. The entries are information for the log-scale parameters under the stated conditional error model. The positive off-diagonal entry reflects the combined sensitivity directions at these two times; it is not a correlation or a direct measure of parameter uncertainty.

Calculation Checks, Alternatives, and Limits

Sensitivity equations are especially useful when predictions come from ODEs and derivatives are needed at many sampling times. Integrating the state and sensitivity equations together propagates derivatives consistently and avoids repeatedly perturbing each parameter. For closed-form predictions, direct symbolic differentiation may be simpler. Finite differences are broadly applicable and useful as an independent check, but their accuracy depends on the perturbation size: a step that is too large has truncation error, while a step that is too small can amplify numerical solver error and roundoff. Automatic differentiation is another option when the implementation supports it, but its result still depends on a correctly specified model and differentiation path.

For a finite-difference check of a total derivative, each perturbed prediction must use all quantities that depend on the perturbed parameter. In particular, use \(x_0(a+\delta)\) and \(x_0(a-\delta)\) when the initial state depends on \(a\). Holding the initial state fixed checks only a derivative with that state artificially held constant; it does not check the total derivative from the sensitivity equation. Use consistent solver tolerances, event handling, and other numerical settings for the perturbed runs.

Several diagnostics help identify errors. Compare sensitivity-equation values with central differences over more than one reasonable step size; inspect units and signs; and check that a derivative approaches zero when the model prediction is independent of a parameter. Large disagreement can indicate a missing chain-rule factor, an omitted initial-state derivative, a coding or event-reset error, or numerical integration error. Sensitivities can also be unstable near discontinuities or where the model is not differentiable; in such cases the derivative may not exist in the usual sense, and a smooth local information calculation may be inappropriate.

Finally, a large derivative does not automatically imply precise estimation. Information depends on the direction of the full sensitivity vector, residual variance, and the other observations and parameters. The matrix above is a local conditional construction, not a substitute for a calculation that accounts for random-effect distributions, parameter-dependent residual error, or uncertainty in the nominal parameter values. Its role is to translate prediction gradients into the information implied by a clearly specified observation model.

Common pitfall: Differentiating a predicted concentration while treating a parameter-dependent initial condition as fixed omits the term \(S_a(0)=\partial x_0/\partial a\). The correction is to differentiate the initial condition and propagate that sensitivity, or to use perturbed predictions with the corresponding perturbed initial states when checking the derivative numerically.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. For \(dx/dt=-kx\) with an initial state independent of \(k\), what is the initial sensitivity \(S_k(0)\)?
  2. If \(m=g(t,x,a)\), write the total derivative of \(m\) with respect to \(a\).
  3. In the IV bolus example, what is \(\partial C/\partial\log(\mathrm{CL})\) at \(t=2\) h?
  4. Why must the initial state be recomputed in a finite-difference check when it depends on the perturbed parameter?
  5. Under what assumptions does \(\mathcal{I}=J^\mathsf{T}R^{-1}J\) give the stated information for the mean parameters?

Solutions. (1) \(S_k(0)=0\), because the initial state does not depend on \(k\). (2) \(\partial m/\partial a=g_xS_a+g_a\), where \(S_a=\partial x/\partial a\). (3) At 2 h, \(\mathrm{CL}t/V=1\) and \(C=5e^{-1}=1.8394\) mg/L, so the derivative is \(-1(1.8394)=-1.8394\) mg/L per log unit. (4) Otherwise the perturbed predictions omit the change in the initial condition and check a different, partial derivative rather than the total derivative. (5) The mean must be differentiable in the parameters, and the observation errors must be independent normal with known, parameter-independent variances as specified; the result is conditional on the parameter values used to form \(J\).