Documentation

21.7 RES and IRES: raw residuals in observation units

RES and IRES are the simplest residuals:

RES  = DV - PRED
IRES = DV - IPRED

They preserve the units of DV. This makes them easy to communicate—a residual of 0.5 mg/L means the observation is 0.5 mg/L above its prediction—but also makes their spread depend on the concentration scale. Under proportional error, larger absolute residuals are expected at larger predictions even when the error model is correct.

RES reflects population prediction error plus between-subject and residual variation. IRES removes the fitted individual deviation through IPRED and is closer to the conditional observation error. Their difference reveals how much the EBE adjustment changes the fit, but neither is standardized for its expected variance.

Residual definitions answer different questions

Plot raw residuals when original units matter, when checking absolute assay error, or when a clinical threshold is expressed in DV units. Pair them with weighted residuals for scale-neutral pattern detection. A raw residual histogram that is narrow at low concentrations and wide at high concentrations may be entirely consistent with proportional error; the corresponding weighted residual should have more stable spread.

Sign convention matters. nlmx uses observation minus prediction, so positive residuals indicate underprediction and negative residuals indicate overprediction. State the convention when comparing external software or custom scripts.

Do not assign zero to rows with blank residuals. An event, missing observation, excluded predose record, or non-Gaussian likelihood contribution has no ordinary raw residual under this definition.

Common mistakes

  • Calling raw residual heteroscedasticity a defect under proportional error.
  • Reversing the residual sign convention.
  • Comparing RES and IRES as if they have the same population meaning.
  • Standardizing raw residuals with an arbitrary sample SD.
  • Replacing undefined residuals with zero.

Checklist

  • Confirm DV units and residual sign.
  • Use RES for population and IRES for conditional questions.
  • Interpret spread in light of the residual-error model.
  • Pair raw and weighted residual views.
  • Preserve undefined values as undefined.

Further reading

Continue with IWRES, WRES, and CWRES.