Related Experiment Video
Updated: May 28, 2026

Performing Repeated Intraoperative Impedance Telemetry Measurements during Cochlear Implantation
Published on: August 4, 2023
Residual Error Coding in NONMEM Can Mislead Diagnostic Residuals: Impact of W Definition on IWRES, WRES, and CWRESI
Nicolas Simon1, Katharina von Fabeck1
1Institut de Neurosciences de la Timone, UMR7289 CNRS, Hop Sainte Marguerite, Department of Clinical Pharmacology, CAP-TV, Aix Marseille University, APHM, Marseille, France.
Abstract:
Background and Objective: In NONMEM, the residual error model is implemented in the $ERROR block, where the user defines the prediction equation, Y, and a scaling factor, W, used to compute the individual weighted residual. This residual is reported in the diagnostic output as IWRES and corresponds to the individual residual divided by W. The residual error variance entering the likelihood is determined solely by the EPS and SIGMA structure of Y, independently of W. Multiple coding approaches for W are encountered in the literature, but no systematic analysis has examined how these choices affect diagnostic residuals. The aim of this study was to characterize the impact of W coding on three commonly used residual diagnostics in NONMEM, namely, IWRES, WRES, and CWRESI, across additive, proportional, and combined residual error models. Methods: Three population pharmacokinetic datasets (500 subjects; 6000 observations each) were simulated from a one-compartment oral model under additive (σ_add = 0.5 mg/L), proportional (CV = 20%), and combined (σ_prop = 0.15, σ_add = 0.5 mg/L) residual error structures. The following nine estimation runs were performed in NONMEM 7.6 (FOCE-I), each differing only in the $ERROR coding of W: normalized SIGMA-based, non-normalized, and THETA-based variants. Diagnostic residuals were compared pairwise by examining observation-by-observation ratios, standard deviations, and Pearson correlations. Results: For additive and proportional models, non-normalized W coding produced IWRES compressed by a constant multiplicative factor equal to sqrt(SIGMA(1,1)), reducing SD(IWRES) from 0.933 to 0.269 for the proportional model, while leaving WRES and CWRESI entirely unaffected. THETA-based normalized codings produced IWRES equivalent to SIGMA-based normalized codings. For the combined model, all three coding variants produced similar IWRES, but CWRESI differed by up to 0.586 units between the two-EPS (VAR.1) and one-EPS parameterizations, reflecting differences in NONMEM's internal variance-covariance matrix structure. The SD coding additionally produced 19 extreme IWRES values (range: -59 to +74) at low predicted concentrations, attributable to the linear approximation of the combined standard deviation. Conclusions: The coding of W in NONMEM substantially affects IWRES but not WRES or CWRESI for simple error models. Cross-run comparisons of IWRES are invalid when W is not consistently normalized. For the combined model, the two-EPS VAR.1 parameterization is recommended for population-level diagnostics. These findings provide a practical framework for consistent and interpretable residual error coding in NONMEM.
Related Concept Videos
Residuals and Least-Squares Property
If the observed data point lies above the line, the residual is positive, and the line underestimates the actual data value for y. If the observed data point lies below the line, the residual is negative, and the line overestimates the actual data value for y.
The process of fitting the best-fit...
Residual Plots
When the residual values are plotted against the variable x, it is called a residual...
Residual Stresses
Detection of Gross Error: The Q Test
Types of Errors: Detection and Minimization
Absolute error in a measurement is the numerical difference from the true or central value. Relative error is the ratio between absolute error and the true or central value, expressed as a percentage.
Errors can be classified by source, magnitude, and sign. There are three types of errors: systematic, random, and gross.
Systematic or...
Documentation of Nursing Diagnosis
In some settings, data-driven computerized decision support systems are in place, allowing for more accurate nursing diagnoses. The database within one of these systems includes diagnostic labels defining characteristics, activities, and indicators for nursing. A nurse enters assessment...
