Tutorials › Nonlinear Mixed-Effects Models (NLME) › NPDE as Whitened Predictive Deviations

Visual and Numerical Predictive Checks · Tutorial 589 of 797

NPDE as Whitened Predictive Deviations

Learn how NPDE use predictive distributions and within-subject covariance to put observations on a normal-deviation scale.

Intermediate 9 min read

What You'll Learn

  • Define marginal predictive probability transforms and their normal-score deviations.
  • Explain how within-subject covariance enters the NPDE transformation.
  • Identify the conditions under which whitened deviations have a standard-normal distribution.
  • Work through a skewed predictive distribution and a correlated two-observation example.
  • Distinguish NPDE from raw residuals and ordinary mean-and-standard-deviation standardization.
  • Recognize when whitening may not justify claims of normality or independence.

Why Predictive Deviations Need Two Adjustments

A residual such as “observed concentration minus predicted concentration” is measured in concentration units. Its size is difficult to compare across times or subjects when the predictive spread changes, and it does not by itself account for skewness in the predictive distribution. A further issue arises when several observations from one subject are dependent: even deviations that are individually well calibrated may tend to move together.

Normalized prediction distribution errors (NPDE) address these features in two stages. First, each observation is located within its model-based predictive distribution and converted to a normal-score scale. Second, the within-subject covariance among those scores is removed by a whitening transformation. The result is a dimensionless deviation that can be compared across observation occasions, subject to the assumptions described below.

The target predictive distribution must match the predictive check being performed. It is defined for the subject’s observed design, such as covariates, dose, and sampling times, and includes the relevant model variability and observation error. Whether random effects are integrated over or conditioned upon must also match the intended check; changing that choice changes the predictive distribution and therefore the NPDE.

Definition and Assumptions

Definition: For subject \(i\), let \(Y_{ij}\) be the observation at occasion \(j\), for \(j=1,\ldots,m_i\). Let \(F_{ij}\) be the continuous marginal predictive cumulative distribution function for \(Y_{ij}\), under the specified model and design. The marginal normal-score deviation is \(Z_{ij}=\Phi^{-1}\{F_{ij}(Y_{ij})\}\), where \(\Phi\) is the standard normal cumulative distribution function. Let \(Z_i=(Z_{i1},\ldots,Z_{im_i})^\mathsf{T}\) and let \(R_i=\operatorname{Cov}(Z_i)\) under the predictive model. An NPDE vector is \(W_i=A_iZ_i\), where \(A_iR_iA_i^\mathsf{T}=I\). Thus its covariance is the identity matrix. A particular whitening convention, such as a symmetric inverse square root or a Cholesky-based transformation, must be specified to determine the coordinates of \(W_i\).

This definition presumes continuous predictive distributions so that the probability integral transform is uniform under the model. In practice, \(F_{ij}\) and \(R_i\) are often approximated using simulated replicates. The ideal properties below describe the population transformation; estimates from a finite number of simulations are approximate.

For the normal-score transformation to have standard normal marginal distributions, the model must correctly describe each observation’s predictive distribution. For the whitened vector to have a multivariate standard normal distribution, a further condition is needed: the vector \(Z_i\) must be multivariate normal. Correct marginal predictive distributions alone guarantee normal marginals for \(Z_i\), but do not guarantee a multivariate normal joint distribution.

Why the Transformation Works

The first step follows from the probability integral transform. If \(Y_{ij}\) has continuous cumulative distribution function \(F_{ij}\), then \(U_{ij}=F_{ij}(Y_{ij})\) is uniform on \((0,1)\). Applying the inverse standard normal CDF to a uniform variable gives a standard normal variable. This converts different predictive scales and shapes to a common marginal scale, but does not remove dependence between observations from the same subject.

The second step removes linear covariance. Since \(W_i=A_iZ_i\), the covariance rule for a linear transformation gives the following result.

$$ \operatorname{Cov}(W_i) =\operatorname{Cov}(A_iZ_i) =A_i\operatorname{Cov}(Z_i)A_i^\mathsf{T} =A_iR_iA_i^\mathsf{T} =I. $$

If \(Z_i\) is multivariate normal with mean zero and covariance \(R_i\), then a linear transformation of \(Z_i\) is also multivariate normal. Its transformed mean is zero and its covariance is \(I\), so \(W_i\) has a multivariate standard normal distribution. Without joint normality, the covariance identity still holds, but it does not establish that every component of \(W_i\) is standard normal or that the components are independent. Uncorrelated variables need not be independent.

Worked Example: A Skewed Predictive Distribution

Suppose a hypothetical concentration has a lognormal predictive distribution with median \(1.00\) mg/L and log-scale standard deviation \(0.200\). Thus \(\log(Y)\sim N(0,0.200^2)\). The observed concentration is \(1.20\) mg/L. Calculate its marginal normal-score deviation.

For this lognormal distribution, the predictive CDF at \(y\) is \(F(y)=\Phi\{\log(y)/0.200\}\). Therefore,

$$ z=\Phi^{-1}\{F(1.20)\} =\frac{\log(1.20)}{0.200} =\frac{0.1823216}{0.200} \approx 0.9116078. $$

The observation is about \(0.912\) normal-score units above the median of its predictive distribution. Equivalently, its predictive CDF value is \(\Phi(0.9116078)\approx0.8190\): about 81.90% of predictions from this continuous distribution are at or below \(1.20\) mg/L. Because this is a single observation, there is no within-subject covariance to remove, so its NPDE is \(0.912\). The NPDE is dimensionless; the original concentration and its units remain important for interpreting the observation itself.

Whitening Within-Subject Dependence

For multiple observations on a subject, the marginal normal scores may remain correlated even when each predictive marginal is correct. The covariance matrix \(R_i\) records this dependence on the normal-score scale. Whitening applies a matrix that changes the coordinates so that the transformed covariance is the identity. Different whitening matrices can satisfy \(A_iR_iA_i^\mathsf{T}=I\); their components need not have the same values, even though they remove covariance under the specified convention.

Worked Example: Whitening Two Correlated Scores

Consider a hypothetical subject with two observations. Their marginal predictive transforms give \(Z_i=(1.00,1.20)^\mathsf{T}\). Suppose the model’s predictive covariance matrix for the normal scores is \(R_i=\begin{pmatrix}1&0.60\\0.60&1\end{pmatrix}\). Use the lower-triangular Cholesky-based whitening convention.

For a two-dimensional correlation matrix with correlation \(0.60\), one whitening matrix is \(A_i=\begin{pmatrix}1&0\\-0.60/0.80&1/0.80\end{pmatrix} =\begin{pmatrix}1&0\\-0.75&1.25\end{pmatrix}\), because \(\sqrt{1-0.60^2}=0.80\). The transformed scores are

$$ W_i=A_iZ_i = \begin{pmatrix}1&0\\-0.75&1.25\end{pmatrix} \begin{pmatrix}1.00\\1.20\end{pmatrix} = \begin{pmatrix}1.00\\-0.75(1.00)+1.25(1.20)\end{pmatrix} = \begin{pmatrix}1.00\\0.75\end{pmatrix}. $$

The second transformed component is \( (1.20-0.60\times1.00)/0.80=0.75\). Under the specified covariance model, the first and second transformed components have unit variance and zero covariance. The second coordinate’s value depends on this triangular convention and the ordering of observations; it is not simply the second marginal score. The calculation illustrates the whitening step, not evidence that the model fits the hypothetical observations.

Worked Example: Why an Ordinary Standardized Residual Can Differ

Use the same hypothetical lognormal predictive distribution as in the first example: median \(1.00\) mg/L, log-scale standard deviation \(0.200\), and observed value \(1.20\) mg/L. Compare its NPDE with a calculation that assumes the predictive distribution is normal and standardizes by its arithmetic mean and standard deviation.

For a lognormal variable with log-scale mean \(0\) and variance \(0.0400\), the arithmetic mean and variance are \(\exp(0.0200)\) and \(\{\exp(0.0400)-1\}\exp(0.0400)\). Numerically, these are approximately \(1.0202\) mg/L and \(0.04248\) \((\text{mg/L})^2\), respectively, giving a standard deviation of approximately \(0.2061\) mg/L. The ordinary standardized difference is therefore

$$ \frac{1.20-1.0202}{0.2061} \approx 0.8724. $$

This differs from the NPDE of \(0.9116\), because the predictive distribution is skewed and the ordinary calculation treats distance from the mean in standard-deviation units as though the distribution were normal. The NPDE instead uses the observation’s location in the full predictive CDF. The difference is not a computational error; it reflects two different transformations.

Practical Interpretation and Limitations

An NPDE expresses an observation’s predictive position on a normal-score scale, after a specified adjustment for within-subject covariance. It is not measured in the endpoint’s physical units and is not a model parameter. A positive marginal normal score means the observation is above its marginal predictive median; a negative score means it is below. After whitening, however, a component is a transformed combination of scores, so that simple above-or-below interpretation applies to the unwhitened marginal score, not necessarily to each whitened coordinate.

The method depends on a suitable predictive distribution and a suitable covariance matrix. If the predictive model is misspecified, the resulting scores need not have the intended distribution. If \(R_i\) is singular, it has no ordinary inverse square root, and full-dimensional whitening is unavailable; a reduced-rank treatment requires separate choices. Estimated predictive CDFs and covariance matrices introduce simulation error, so computed NPDE are approximations to the ideal values.

A basic diagnostic review should check that the transformation used the intended predictive target, that the marginal predictive distributions are continuous or handled appropriately, and that the estimated covariance is numerically usable. Unusual score patterns, strong dependence remaining after transformation, or sensitivity to simulation choices can indicate a problem with the model, the simulation, or the transformation. A covariance identity alone is not a guarantee of normality, independence, or adequate model fit.

  • Mistake: treating an NPDE as an ordinary residual. The NPDE is dimensionless and distribution-based; it is not an observed-minus-predicted difference in endpoint units.
  • Mistake: assuming marginal transforms remove dependence. Normal-score conversion standardizes marginal predictive positions, but within-subject dependence remains until a covariance transformation is applied.
  • Mistake: claiming whitening always creates independent standard normals. Whitening guarantees identity covariance when its covariance matrix is correct. Joint standard normality, and hence independence of components, additionally requires a multivariate normal transformed vector.
Key takeaway: NPDE first map observations through their model-based predictive CDFs to obtain normal-score deviations, then whiten the within-subject covariance. Their standard-normal interpretation is exact only under the corresponding predictive and joint-distribution assumptions.

Check Your Understanding

Answer each question, then compare with the brief solutions below.

  1. Under a continuous, correct marginal predictive distribution, what is the distribution of \(F_{ij}(Y_{ij})\), and what transformation produces a standard normal marginal score?
  2. If the transformed-score covariance is \(R_i\) and \(A_iR_iA_i^\mathsf{T}=I\), what does whitening establish, and what does it not establish by itself?
  3. A predictive CDF at an observed value is \(0.975\). Is the marginal normal score positive or negative, and approximately how large is it?
  4. Why can an NPDE differ from an observed-minus-mean difference divided by a predictive standard deviation?

Solutions. (1) The probability integral transform is uniform on \((0,1)\); applying \(\Phi^{-1}\) gives a standard normal marginal score. (2) It establishes identity covariance for the transformed vector, but not joint normality or independence unless additional distributional conditions hold. (3) The score is \(\Phi^{-1}(0.975)\approx1.96\), so it is positive. (4) NPDE use the full predictive CDF and can reflect skewness or other nonnormal shape, whereas mean-and-standard-deviation standardization uses only two summaries and does not generally yield a normal score.