Chorus Sign in

Calculation & Modeling Reference

The mathematical foundations and computational methods implemented in Chorus.

Anthropometric Formulas

Body Mass Index (BMI)

$$ BMI = \frac{W_{kg}}{H_{m}^2} $$

Body Surface Area — Mosteller

$$ BSA = \sqrt{\frac{W_{kg} \times H_{cm}}{3600}} $$

Body Surface Area — Du Bois

$$ BSA = 0.007184 \times W_{kg}^{0.425} \times H_{cm}^{0.725} $$

Ideal Body Weight — Devine

Male $$ IBW = 50.0 + 2.3 \times (H_{in} - 60) $$
Female $$ IBW = 45.5 + 2.3 \times (H_{in} - 60) $$

$H_{in}$: height in inches. Applied only when $H_{in} > 60$.

Adjusted Body Weight

$$ ABW = IBW + 0.4 \times (W_{actual} - IBW) $$

Used when $W_{actual} > 1.2 \times IBW$.

Threshold-Based Weight Selection

if $W_{actual} > 1.2 \times IBW$: use $ABW$
else if $W_{actual} < IBW$: use $W_{actual}$
else: use $IBW$

Used by models that specify "adjusted" or "dosing" weight without specifying a formula.

Lean Body Weight / Fat-Free Mass — Janmahasatian

Male $$ LBW = \frac{9270 \times W_{kg}}{6680 + 216 \times BMI} $$
Female $$ LBW = \frac{9270 \times W_{kg}}{8780 + 244 \times BMI} $$

Renal Function

Creatinine Clearance — Cockcroft-Gault

$$ CrCl = \frac{(140 - Age) \times W_{kg} \times S_{sex}}{72 \times SCr} $$
$S_{sex}$: Male $= 1.0$, Female $= 0.85$
Result capped at the configured maximum CrCl (default 120 mL/min).
SCr conversion (IDMS → conventional): $SCr_{conv} = SCr_{IDMS} \times 1.065 + 0.067$. Applied when models specify conventional-method creatinine.

Estimated GFR — CKD-EPI 2021 (Race-Free)

$$ eGFR = 142 \times \min\!\left(\frac{SCr}{\kappa}, 1\right)^{\!\alpha} \times \max\!\left(\frac{SCr}{\kappa}, 1\right)^{-1.200} \times 0.9938^{Age} \times S_{sex} $$
Sex $\kappa$ $\alpha$ if $SCr \le \kappa$ $\alpha$ if $SCr > \kappa$ $S_{sex}$
Female $0.7$ $-0.241$ $-1.200$ $1.012$
Male $0.9$ $-0.302$ $-1.200$ $1.000$

Inker LA et al. N Engl J Med. 2021;385:1737-1749.

Compartment Pharmacokinetic Models

One-Compartment Model

Micro-Constant

$$ k_{10} = \frac{CL}{V_1} $$

Iterative Update

$$ C(t) = C(t-1) \cdot e^{-k_{10}\,\Delta t} + \frac{R_{inf}}{k_{10}\,V_1}\!\left(1 - e^{-k_{10}\,\Delta t}\right) $$

Steady-State Initialization

When steady-state initialization is enabled, the simulation starts with concentration $C_{ss}$ at the end of the first dose's post-infusion interval:

$$ C_{ss} = \frac{D}{CL \cdot T_{inf}} \cdot \frac{(1 - e^{-k_{10} T_{inf}})}{(1 - e^{-k_{10} \tau})} \cdot e^{k_{10}(T_{inf} - \tau)} $$

$D$: dose; $T_{inf}$: infusion duration; $\tau$: dosing interval.

Two-Compartment Model

Micro-Constants

$$ k_{10} = \frac{CL}{V_1} \qquad k_{12} = \frac{Q_2}{V_1} \qquad k_{21} = \frac{Q_2}{V_2} $$

Hybrid Rate Constants ($\alpha$, $\beta$)

Roots of the characteristic quadratic $\lambda^2 + a_1\lambda + a_0 = 0$:

$$ a_0 = k_{10} k_{21} \qquad a_1 = -(k_{10} + k_{12} + k_{21}) $$ $$ \alpha,\, \beta = \frac{-a_1 \pm \sqrt{a_1^2 - 4a_0}}{2} \qquad (\alpha > \beta) $$

Biexponential Coefficients ($A$, $B$)

$$ A = \frac{k_{21} - \alpha}{V_1\,(\beta - \alpha)} \qquad B = \frac{k_{21} - \beta}{V_1\,(\alpha - \beta)} $$

Iterative Update

$$ C_A(t) = C_A(t-1)\cdot e^{-\alpha\,\Delta t} + \frac{R_{inf}\cdot A}{\alpha}\!\left(1 - e^{-\alpha\,\Delta t}\right) $$ $$ C_B(t) = C_B(t-1)\cdot e^{-\beta\,\Delta t} + \frac{R_{inf}\cdot B}{\beta}\!\left(1 - e^{-\beta\,\Delta t}\right) $$ $$ C_{total}(t) = C_A(t) + C_B(t) $$

Steady-State Initialization

$$ C_{A,ss} = \frac{\dot{D}\cdot A}{\alpha} \cdot \frac{(1 - e^{-\alpha T_{inf}})}{(1 - e^{-\alpha\tau})} \cdot e^{\alpha(T_{inf}-\tau)} $$ $$ C_{B,ss} = \frac{\dot{D}\cdot B}{\beta} \cdot \frac{(1 - e^{-\beta T_{inf}})}{(1 - e^{-\beta\tau})} \cdot e^{\beta(T_{inf}-\tau)} $$

$\dot{D} = D / T_{inf}$: infusion rate.

Three-Compartment Model

Micro-Constants

$$ k_{10} = \frac{CL}{V_1} \quad k_{12} = \frac{Q_2}{V_1} \quad k_{21} = \frac{Q_2}{V_2} \quad k_{13} = \frac{Q_3}{V_1} \quad k_{31} = \frac{Q_3}{V_3} $$

Characteristic Polynomial Coefficients

Roots of the cubic $\lambda^3 + a_2\lambda^2 + a_1\lambda + a_0 = 0$:

$$ a_0 = k_{10}\,k_{21}\,k_{31} $$ $$ a_1 = k_{10}k_{31} + k_{21}k_{31} + k_{21}k_{13} + k_{10}k_{21} + k_{31}k_{12} $$ $$ a_2 = k_{10} + k_{12} + k_{13} + k_{21} + k_{31} $$

Hybrid Rate Constants ($\alpha$, $\beta$, $\gamma$) — Cardano Trigonometric Method

Reducing to depressed cubic form $t^3 + pt + q = 0$ via substitution $\lambda = t - a_2/3$:

$$ p = a_1 - \frac{a_2^2}{3} \qquad q = \frac{2a_2^3}{27} - \frac{a_1 a_2}{3} + a_0 $$

For three real roots ($p < 0$), the trigonometric solution gives:

$$ \varphi = \frac{1}{3}\arccos\!\left(\frac{-q/2}{\sqrt{-p^3/27}}\right) \qquad r = 2\sqrt{-p/3} $$ $$ \alpha = -\!\left(r\cos\varphi - \tfrac{a_2}{3}\right) $$ $$ \beta = -\!\left(r\cos\!\left(\varphi + \tfrac{2\pi}{3}\right) - \tfrac{a_2}{3}\right) $$ $$ \gamma = -\!\left(r\cos\!\left(\varphi + \tfrac{4\pi}{3}\right) - \tfrac{a_2}{3}\right) $$

$\alpha > \beta > \gamma > 0$ for a pharmacokinetically stable system.

Triexponential Coefficients ($A$, $B$, $C$)

$$ A = \frac{1}{V_1} \cdot \frac{(k_{21}-\alpha)(k_{31}-\alpha)}{(\beta-\alpha)(\gamma-\alpha)} $$ $$ B = \frac{1}{V_1} \cdot \frac{(k_{21}-\beta)(k_{31}-\beta)}{(\alpha-\beta)(\gamma-\beta)} $$ $$ C = \frac{1}{V_1} \cdot \frac{(k_{21}-\gamma)(k_{31}-\gamma)}{(\alpha-\gamma)(\beta-\gamma)} $$

Iterative Update

$$ C_A(t) = C_A(t-1)\cdot e^{-\alpha\,\Delta t} + \frac{R_{inf}\cdot A}{\alpha}\!\left(1 - e^{-\alpha\,\Delta t}\right) $$ $$ C_B(t) = C_B(t-1)\cdot e^{-\beta\,\Delta t} + \frac{R_{inf}\cdot B}{\beta}\!\left(1 - e^{-\beta\,\Delta t}\right) $$ $$ C_C(t) = C_C(t-1)\cdot e^{-\gamma\,\Delta t} + \frac{R_{inf}\cdot C}{\gamma}\!\left(1 - e^{-\gamma\,\Delta t}\right) $$ $$ C_{total}(t) = C_A(t) + C_B(t) + C_C(t) $$

Steady-State Initialization

$$ C_{A,ss} = \frac{\dot{D}\cdot A}{\alpha} \cdot \frac{(1 - e^{-\alpha T_{inf}})}{(1 - e^{-\alpha\tau})} \cdot e^{\alpha(T_{inf}-\tau)} $$ $$ C_{B,ss} = \frac{\dot{D}\cdot B}{\beta} \cdot \frac{(1 - e^{-\beta T_{inf}})}{(1 - e^{-\beta\tau})} \cdot e^{\beta(T_{inf}-\tau)} $$ $$ C_{C,ss} = \frac{\dot{D}\cdot C}{\gamma} \cdot \frac{(1 - e^{-\gamma T_{inf}})}{(1 - e^{-\gamma\tau})} \cdot e^{\gamma(T_{inf}-\tau)} $$

Bayesian MAP Estimation

Individual pharmacokinetic parameters are estimated by minimizing the negative log-posterior — the MAP objective. An L-BFGS optimizer operates in an unbounded transformed space, with Jacobian corrections applied to account for the parameter bounds.

Individual Parameter Transformations ($\eta$)

Exponential (multiplicative) $$ P_{ind} = P_{pop} \times e^{\eta} $$
Proportional (additive) $$ P_{ind} = P_{pop} \times (1 + \eta) $$

Which form is used depends on the original NONMEM model specification for each parameter.

MAP Objective Function

$$ \mathcal{L}(\eta) = -\bigl(LL(\eta) + LP(\eta)\bigr) $$

Minimized by L-BFGS over the individual variability parameters $\eta$.

Log-Likelihood ($LL$)

Observations follow a combined additive + proportional error model. Total variance at observation $i$:

$$ \sigma_i^2 = \sigma_{add}^2 + \sigma_{prop}^2 \cdot \hat{C}_i^2 $$

Log-likelihood (with per-observation weights $w_i$ and global weight $\lambda_L$):

$$ LL(\eta) = -\frac{\lambda_L}{2} \sum_{i=1}^{n} w_i \left[\frac{(C_{obs,i} - \hat{C}_i)^2}{\sigma_i^2} + \ln(2\pi\sigma_i^2)\right] $$

$\hat{C}_i$: model-predicted concentration; $\lambda_L$: likelihood weight parameter.

Log-Prior ($LP$)

Multivariate normal prior on $\eta$ with covariance matrix $\Omega$ (the between-subject variability matrix). $\Omega$ is factored via Cholesky decomposition $\Omega = LL^T$ to evaluate the quadratic form efficiently:

$$ LP(\eta) = -\frac{1}{2\lambda_L}\left(\eta^T \Omega^{-1} \eta + \ln|\Omega|\right) $$

$\ln|\Omega| = 2\sum_i \ln L_{ii}$ from the Cholesky factor diagonal.

Error Metrics

All metrics use observation-normalized weights. Raw weights $w_i$ are first normalized so their sum equals the number of observations:

$$ w'_i = w_i \cdot \frac{n}{\displaystyle\sum_{j=1}^n w_j} $$

Sum of Squared Errors (SSE)

$$ SSE = \sum_{i=1}^{n} w'_i\,(\hat{C}_i - C_{obs,i})^2 $$

Root Mean Squared Deviation (RMSD)

$$ RMSD = \sqrt{\frac{SSE}{\displaystyle\sum_{i=1}^n w'_i}} $$

Bias (Mean Weighted Error)

$$ Bias = \frac{\displaystyle\sum_{i=1}^n w'_i\,(\hat{C}_i - C_{obs,i})}{\displaystyle\sum_{i=1}^n w'_i} $$

Ensemble Averaging

Three ensemble methods are available, following the model averaging/selection approach of Uster et al. All produce a set of normalized model weights $W_m$ that sum to 1, which are then used to form the weighted-average concentration profile. Models falling below a minimum-weight threshold are dropped and the remaining weights renormalized.

Simple Average

$$ W_m = \frac{1}{M} $$

$M$: number of selected models.

SSE-Weighted (default)

$$ SSE_m = \sum_{j} \big(\text{obs}_j - \text{pred}_{m,j}\big)^2 \qquad W_m = \frac{e^{-\tfrac{1}{2} SSE_m}}{\displaystyle\sum_{j} e^{-\tfrac{1}{2} SSE_j}} $$

Uster et al. $W_{\text{SSE}}$ (squared-residual form per the 2021 erratum). Judges every model on its fit to this patient's levels on a common scale, so weight spreads across comparably-fitting models.

SSE + Shrinkage

$$ W_m = \frac{e^{-\tfrac{1}{2}\left(SSE_m + \alpha\,\eta_m^{\top}\Omega_m^{-1}\eta_m\right)}} {\displaystyle\sum_{j} e^{-\tfrac{1}{2}\left(SSE_j + \alpha\,\eta_j^{\top}\Omega_j^{-1}\eta_j\right)}} $$

Adds a penalty for overfitting: $\eta_m^{\top}\Omega_m^{-1}\eta_m$ is the squared standardized distance the MAP fit moved from model $m$'s population prior, so a model that fits only by assuming an atypical patient is downweighted. The strength $\alpha \ge 0$ is configurable; $\alpha = 0$ recovers SSE-weighting exactly.

Weighted-Average Concentration

$$ \bar{C}(t_k) = \sum_{m=1}^M W_m \cdot C_m(t_k) $$

Regimen Search

AUC/MIC — Linear-Up/Log-Down Trapezoidal

Exposure over a dosing interval is integrated with the linear-up/log-down trapezoidal method. Rising or flat segments use the linear trapezoid; declining segments use the logarithmic trapezoid, which follows the exponential elimination between points more closely than a straight chord. Segments with a non-positive endpoint fall back to the linear form.

$$ AUC_{\tau} = \sum_{k} A_k, \qquad A_k = \begin{cases} \dfrac{C(t_k)+C(t_{k+1})}{2}\,\Delta t_k & C(t_{k+1}) \ge C(t_k) \\[2mm] \dfrac{C(t_k)-C(t_{k+1})}{\ln\!\big(C(t_k)/C(t_{k+1})\big)}\,\Delta t_k & C(t_{k+1}) < C(t_k) \end{cases} $$ $$ AUC_{24} = AUC_{\tau} \cdot \frac{24}{\tau} \qquad \frac{AUC}{MIC} = \frac{AUC_{24}}{MIC} $$

AKI Detection — KDIGO Criteria

Acute kidney injury is detected from the serum creatinine time series using a KDIGO-informed sliding window algorithm. For each creatinine measurement at time $t_i$:

$SCr_{baseline}(t_i) = \min\{SCr(t) : t \in [t_i - W,\, t_i]\}$
AKI onset if $\;SCr(t_i) \ge SCr_{baseline}(t_i) + \Delta_{rise}$

Following onset, recovery is tracked as the first time $SCr$ falls back to or below $SCr_{baseline} \times f_{resolution}$.

$W$ Lookback window (configurable, default 48 h)
$\Delta_{rise}$ Absolute SCr rise threshold (configurable, default 0.3 mg/dL)
$f_{resolution}$ Recovery factor (configurable, default 1.5×)