Validation

Numerical benchmarking against established pharmacometrics libraries.

Chorus performs two core mathematical tasks: simulating concentration–time curves from pharmacokinetic parameters, and estimating individual parameters (MAP Bayesian estimation) from observed serum levels. Each function is benchmarked against a standard reference library.

This evaluation examines numerical precision, not clinical validity.

Comparator Version Function Validation role
rxode2 3.0.4 Solves ODE compartment models numerically, step by step. The differential equation solver underlying nlmixr2 and standard R-based population PK workflows.
mapbayr 0.10.0
mrgsolve 1.5.2
Computes MAP Bayesian individual parameter estimates (η). Developed specifically for clinical TDM and cross-validated against NONMEM; executes on mrgsolve.

Concentration–time simulation

Chorus calculates compartment kinetics via exact closed-form analytical solutions, whereas rxode2 performs step-by-step numerical integration. Because these are mathematically distinct approaches, convergence between them validates the underlying arithmetic.

Both engines were parameterized using the established Goti et al. (2018) two-compartment model for a 62-year-old male (82 kg) receiving 1250 mg IV every 12 hours.

0 10 20 30 Chorus rxode2 Measured level Concentration (mg/L) 0 8 16 24 32 40 Time (hours)

The resulting curves are visually indistinguishable, with agreement extending to eleven decimal places:

Landmark Time Chorus (mg/L) rxode2 (mg/L)
End of first infusion 1 h 16.35875470 16.35875470
Trough 1 12 h 7.65056688 7.65056688
Trough 2 24 h 13.03705502 13.03705502
Concentration at level 2 36 h 16.98362013 16.98362013

The maximum absolute discrepancy across the entire 48-hour profile is 0.00000000003 mg/L, representing the machine rounding limit.

Multi-scenario simulation stress tests

To stress-test Chorus, both engines were compared point by point across 330 simulated clinical scenarios spanning one-, two- and three-compartment models across typical and extreme ranges of clearance and volume. The 48-hour sweep accounts for 255 of them:

Dynamic covariate behavior Scenarios Worst absolute Δ (mg/L) Median absolute Δ (mg/L)
Static kinetics (fixed CL, V) 136 0.00000003 0.00000000008
Time-varying clearance (dynamic SCr) 60 0.0086 0.000055
Fully dynamic (CL, V and Q varying) 59 0.0054 0.00017

Values reflect deviations on peak concentrations of 30–60 mg/L.

In static scenarios, discrepancies stay at double-precision floating-point limits. When renal clearance fluctuates, minor deviations arise because Chorus updates covariates discretely per grid interval, whereas rxode2 interpolates continuously.

The remaining 75 run longer courses. In a battery of 69 week-long dosing regimens with simultaneous parameter drift, the maximum divergence observed was 0.0094 mg/L, with errors plateauing rather than accumulating over time; a further 6 scenarios extend to 21 days.

Precision on clinical target metrics

Metric Max relative discrepancy Median relative discrepancy
Trough concentration 0.012% <0.001%
Course AUC24 0.0001% 0.00001%

Evaluated across 7-day courses at default grid resolution. For an AUC24 of 500 mg·h/L, the maximum deviation was ~0.0005 mg·h/L.

Bayesian parameter estimation

Simulating a curve is distinct from the inverse problem: estimating individual clearance and volume from measured concentrations. Chorus and mapbayr implement MAP Bayesian optimization independently using separate solvers — the Chorus WebAssembly core against mrgsolve.

Using the same Goti (2018) model, both engines were supplied two measured serum levels: 8.0 mg/L (12 h trough) and 17.5 mg/L (36 h post-dose), then solved for the individual parameter deviations (η).

0 10 20 30 Chorus mapbayr Measured level Concentration (mg/L) 0 0.0001 0.0002 Difference (mg/L) 0 8 16 24 32 40 Time (hours)
Landmark Time Chorus (mg/L) mapbayr (mg/L) Absolute difference (mg/L)
End of first infusion 1 h 16.358755 16.358845 0.000090
Trough 1 12 h 7.650567 7.650601 0.000034
Trough 2 24 h 13.037055 13.037107 0.000052
Level 2 draw 36 h 16.983620 16.983678 0.000058

The maximum discrepancy between the fitted posterior curves across the full course is 0.00014 mg/L.

Estimated random effects (η)

Parameter Chorus η mapbayr η Absolute difference
Clearance (CL) 0.029336 0.029335 0.0000007
Central volume (V1) 0.047157 0.047151 0.0000059
Peripheral volume (V2) 0.026110 0.026101 0.0000085

Library-wide consistency (all 46 models)

The same case was solved across all 46 models in the library using both estimators:

Evaluation Worst Δη Median Δη
46 models, all random effects 0.0016 0.0000048

Simulation settings

Models

selected

Dose candidates (mg)

Interval candidates (h)

Demographics

Physical characteristics.

kg
cm
yr