Why Residual Error Changes VPC Spread
A visual predictive check (VPC) compares observed concentration summaries with summaries calculated from replicate data simulated under a fitted model. Residual error is part of those simulations: it determines how much simulated observations vary around their model predictions. Its form therefore affects not only the apparent scatter of individual concentrations, but also the simulated median and outer quantiles that form a VPC.
This matters especially when predictions cover a wide range. With proportional error, a fixed relative error produces larger absolute deviations at higher predictions. With combined error, an additive component contributes a baseline amount of variability at all predictions, while the proportional component grows with the prediction. Understanding that pattern helps distinguish a change in spread expected from the specified error model from spread that may signal model inadequacy.
For the calculations below, assume the error terms are normally distributed, have mean zero, and are independent of each other and of the prediction conditional on \(F_{ij}\). Write \(\epsilon_{a,ij}\sim N(0,\sigma_a^2)\) and \(\epsilon_{p,ij}\sim N(0,\sigma_p^2)\). The parameter \(\sigma_a\) has concentration units, whereas \(\sigma_p\) is dimensionless. These are assumptions about the residual model, not claims that the population predictions or the marginal distribution of concentrations are normal.
Conditional Spread and Quantiles
In a proportional model, conditional on a fixed prediction \(F\), the concentration has mean \(F\) and standard deviation \(\sigma_pF\), for positive \(F\). Thus its absolute spread changes with prediction, while its conditional coefficient of variation is \(\sigma_p\). In an additive model, the conditional standard deviation is \(\sigma_a\), so the absolute spread is constant under the model.
For the combined model, independence and zero means make the two error variances add. The conditional mean remains \(F\), and the conditional variance is the sum of the additive and proportional contributions:
Consequently, the conditional \(q\) quantile is \(F+z_q\sqrt{\sigma_a^2+(\sigma_pF)^2}\), where \(z_q\) is the \(q\) quantile of the standard normal distribution. For example, \(z_{0.05}\approx-1.645\) and \(z_{0.95}\approx1.645\). These are quantiles conditional on one prediction. They are not the VPC’s simulation-based uncertainty limits for a binned quantile: those limits describe variation in the quantile across replicate simulated data sets.
The variance expression follows directly from the model. Conditional on \(F\), the fixed prediction contributes no variance. The two random terms have variances \(\sigma_a^2\) and \(F^2\sigma_p^2\); because they are independent, their covariance is zero, so the variance of their sum is \(\sigma_a^2+F^2\sigma_p^2\). A normal distribution is retained because a sum of independent normal variables is normal. This derivation also shows why independence is needed for the stated variance formula.
Worked Example: Proportional Error at Low and High Predictions
Suppose a hypothetical fitted model uses proportional error with \(\sigma_p=0.20\). Calculate the conditional 5th and 95th percentiles at predictions of 2 mg/L and 20 mg/L.
At \(F=2\) mg/L, the conditional standard deviation is \(\sigma_pF=0.20(2)=0.40\) mg/L. The two quantiles are \(2\pm1.645(0.40)=2\pm0.658\), or approximately 1.342 mg/L and 2.658 mg/L.
At \(F=20\) mg/L, the standard deviation is \(0.20(20)=4.00\) mg/L. The quantiles are \(20\pm1.645(4.00)=20\pm6.58\), or 13.42 mg/L and 26.58 mg/L.
The prediction is ten times larger in the second calculation, and so is the absolute standard deviation and the distance from the mean to either quantile. In both cases, that distance is 1.645 times the prediction multiplied by 0.20. Proportional error therefore implies constant relative spread, not constant spread in mg/L.
Worked Example: Combined Error at Low and High Predictions
For a hypothetical model, let \(\sigma_a=1.00\) mg/L and \(\sigma_p=0.15\). Use the combined-error formula to calculate the conditional 5th and 95th percentiles at predictions of 2 mg/L and 20 mg/L. Assume independent normal error components as defined above.
At \(F=2\) mg/L, the proportional contribution to the standard deviation is \(0.15(2)=0.30\) mg/L. Therefore, \(SD(Y\mid F)=\sqrt{1.00^2+0.30^2}=\sqrt{1.09}=1.04403065\) mg/L. The quantile offset is \(1.645(1.04403065)=1.71743\) mg/L, giving \(2-1.71743=0.28257\) mg/L and \(2+1.71743=3.71743\) mg/L. Rounded to three decimals, the conditional percentiles are 0.283 mg/L and 3.717 mg/L.
At \(F=20\) mg/L, the proportional contribution is \(0.15(20)=3.00\) mg/L. The standard deviation is \(\sqrt{1.00^2+3.00^2}=\sqrt{10}=3.16228\) mg/L. The offset is \(1.645(3.16228)=5.20195\) mg/L, so the percentiles are \(20-5.20195=14.79805\) mg/L and \(20+5.20195=25.20195\) mg/L, or 14.798 mg/L and 25.202 mg/L.
At the lower prediction, additive variance contributes \(1.00\) of the total \(1.09\) \((\mathrm{mg/L})^2\). At the higher prediction, it contributes \(1.00\) of \(10.00\) \((\mathrm{mg/L})^2\), with the proportional component supplying the remaining \(9.00\). The total absolute spread increases with prediction, although the additive component itself does not.
Connecting Conditional Error to a VPC
A VPC is built from data sets simulated under the fitted model and the observation design. In each replicate, the relevant predictions, random effects, residual errors, and any other model components are simulated according to the specified procedure. Observations are grouped into the chosen time bins, and summaries such as the median and lower and upper quantiles are computed for the observed data and for each replicate. The distribution of a simulated summary across replicates supplies its simulation-based prediction interval.
Conditional error calculations explain how the residual model behaves around a fixed \(F\); a VPC summarizes data that may combine many predictions and individuals within a bin. If predictions or random effects vary within a bin, its simulated quantiles are not obtained simply by applying the conditional formula at the average prediction. The simulation must reproduce the relevant model and design. This is one reason to read the VPC’s simulated bands, rather than treating a conditional residual interval as if it were the VPC band.
Worked Example: Reading Spread in Two VPC Bins
Consider a hypothetical combined-error model with \(\sigma_a=0.50\) mg/L and \(\sigma_p=0.10\). In a lower-prediction bin, take \(F=5\) mg/L; in a higher-prediction bin, take \(F=15\) mg/L. First calculate the conditional 10th and 90th percentiles using \(z_{0.10}\approx-1.2816\) and \(z_{0.90}\approx1.2816\).
For \(F=5\) mg/L, the variance is \(0.50^2+(0.10(5))^2=0.25+0.25=0.50\) \((\mathrm{mg/L})^2\). Thus \(SD=\sqrt{0.50}=0.7071\) mg/L, and the quantile offset is \(1.2816(0.7071)=0.9062\) mg/L. The conditional percentiles are approximately 4.094 mg/L and 5.906 mg/L.
For \(F=15\) mg/L, the variance is \(0.50^2+(0.10(15))^2=0.25+2.25=2.50\) \((\mathrm{mg/L})^2\). Thus \(SD=\sqrt{2.50}=1.58113883\) mg/L, and the offset is \(1.2816\sqrt{2.50}=2.0263875\) mg/L. The conditional percentiles are approximately 12.974 mg/L and 17.026 mg/L.
Suppose, in addition, that a hypothetical VPC based on replicate simulations reports 95% simulation intervals for the lower-bin observed 10th, median, and 90th percentiles of [3.94, 4.22], [4.72, 5.28], and [5.78, 6.08] mg/L. If the corresponding observed summaries are 4.20, 5.10, and 6.15 mg/L, the observed 10th percentile and median fall within their intervals, but the 90th percentile lies above its interval. This is evidence of a discrepancy in the upper-tail summary for that bin, not proof that proportional error alone is wrong.
If the higher-prediction bin’s simulation intervals similarly bracket its median and lower quantile but not its upper quantile, the repeated upper-tail discrepancy deserves investigation. If instead observed outer quantiles lie outside simulation intervals in a way that changes systematically from low to high predictions, the model’s predicted spread across those ranges is also in question. Such comparisons concern the VPC summaries; they do not mean that a single observation must lie inside a conditional 5th-to-95th-percentile interval.
Assumptions, Diagnostics, and Alternatives
The calculations above require a correct specification of the residual-error form, the stated conditional means and variances, and—in the combined model—independent error components. The normal quantile calculations additionally require normal residual errors. A simulation-based VPC does not require readers to derive its bands from normal quantiles, but its simulations must use the fitted error model as intended. If the residual distribution is nonnormal, the model’s simulated quantiles may still be calculated empirically; the normal formulas in this tutorial no longer describe them exactly.
When assessing spread, compare observations with the corresponding simulated summaries across bins and prediction ranges. A pattern in which spread is too narrow at high predictions but reasonable at low predictions can indicate that the model does not capture high-level variability. Excess spread most evident at low predictions can point toward an inadequate additive component or other low-concentration behavior. These patterns are clues, not unique diagnoses: structural misspecification, covariate or random-effect variation, bin composition, and data limitations can also affect VPC summaries.
The main alternatives make distinct predictions about scale. Additive error gives constant absolute conditional standard deviation; proportional error gives standard deviation proportional to \(F\); combined error includes both. A useful model comparison asks whether the observed spread across prediction levels is compatible with each candidate model’s simulated VPC, not merely which model yields a visually appealing spread at one concentration. The fitted error model should also be checked against residual diagnostics and scientific measurement considerations.
A limitation of the normal additive and combined models is that they can assign positive probability to negative concentrations. For the combined model, the conditional probability is \(P(Y<0\mid F)=\Phi\!\left(-F/\sqrt{\sigma_a^2+(\sigma_pF)^2}\right)\), where \(\Phi\) is the standard normal cumulative distribution function. Whether this matters depends on the prediction and error parameters; it should not be ignored when the resulting probability is material. A transformation or another residual distribution may be more appropriate in such settings, but it changes the quantile calculations and must be used consistently in simulation.
Practical Reading Sequence
Record whether the model is additive, proportional, or combined, and note the units of each error parameter.
For combined error, compare \(\sigma_a^2\) with \((\sigma_pF)^2\) at low and high predictions.
Assess median and outer quantiles by bin; do not substitute conditional residual quantiles for uncertainty intervals of simulated VPC summaries.
Note whether deviations recur across bins or prediction levels, then consider residual and structural explanations rather than assigning a cause from one feature alone.
Check Your Understanding
Answer each question, then compare with the solutions below.
- Under proportional error with \(\sigma_p=0.12\), what is the conditional standard deviation at \(F=10\) mg/L? What is the 95th percentile using \(z_{0.95}=1.645\)?
- For combined error with \(\sigma_a=0.80\) mg/L and \(\sigma_p=0.10\), calculate the conditional standard deviation at \(F=4\) mg/L.
- At what prediction are the additive and proportional contributions to variance equal if \(\sigma_a=0.60\) mg/L and \(\sigma_p=0.15\)?
- Why is a conditional 5th-to-95th-percentile interval not the same thing as a VPC simulation interval for the 95th-percentile summary?
Solutions. (1) \(SD=0.12(10)=1.20\) mg/L, so the 95th percentile is \(10+1.645(1.20)=11.974\) mg/L. (2) \(SD=\sqrt{0.80^2+(0.10(4))^2}=\sqrt{0.80}=0.8944\) mg/L. (3) Set \(\sigma_a=\sigma_pF\): \(F=0.60/0.15=4.00\) mg/L. (4) The conditional interval describes individual concentrations around a fixed prediction; the VPC simulation interval describes how a binned quantile varies across replicate simulated data sets.