Skip to contents

Overview

  • Incorporates feedback from Dr. Morrison and Dr. Aiemjoy
  • Builds on (Teunis and Eijkeren 2016) framework for antibody kinetics
  • Focus on covariance structure: parameter covariance within each biomarker (ΣP,j\Sigma_{P,j}, 5×5 per biomarker) and biomarker covariance across jj (ΣB\Sigma_B, across biomarkers)
  • Uses updated parameterization: log(y0)\log(y_0), log(y1y0)\log(y_1 - y_0), log(t1)\log(t_1), log(α)\log(\alpha), log(ρ1)\log(\rho-1)
  • Current stage: block-diagonal covariance (independent biomarkers)
  • Planned extension: full ΣB\Sigma_B to capture correlation between biomarkers

Observation Model (Data Level)

Observed (log-transformed) antibody levels:

log(yobs,ij)𝒩(μlogy,ij,τj1)(1) \log(y_{\text{obs},ij}) \sim \mathcal{N}(\mu_{\log y,ij}, \tau_j^{-1}) \qquad(1)

Where:

  • yobs,ijy_{\text{obs},ij}: Observed antibody level for subject ii and biomarker jj
  • μlogy,ij\mu_{\log y,ij} is the expected log antibody level, computed from the two-phase model using subject-level parameters θij\theta_{ij}.
  • θij\theta_{ij}: Subject-level latent parameters (e.g., y0,α,ρy_0, \alpha, \rho) used to define the predicted antibody curve
  • τj\tau_j: Measurement precision (inverse of variance) specific to biomarker jj

Measurement precision prior:

τjGamma(aj,bj)(2) \tau_j \sim \text{Gamma}(a_j, b_j) \qquad(2)

Where:

  • τj\tau_j: Precision (inverse of variance) of the measurement noise for biomarker jj
  • (aj,bj)(a_j, b_j): Shape and rate hyperparameters of the Gamma prior for precision, which control its expected value and variability

Parameter Summary

Table 1: Parameter summary for antibody kinetics model.
Symbol Description
μy\mu_y Antibody production rate (growth phase)
μb\mu_b Pathogen replication rate
γ\gamma Clearance rate (by antibodies)
α\alpha Antibody decay rate
ρ\rho Shape of antibody decay (power-law)
t1t_1 Time of peak response
y1y_1 Peak antibody concentration

Note: Only the first 6 are typically estimated. y1y_1 is derived from the ODE solution at t1t_1.

Within-Host ODE System (Teunis and Eijkeren 2016)

Two-phase within-host antibody kinetics:

dydt={μyy(t),tt1αy(t)ρ,t>t1with dbdt=μbb(t)γy(t)(3) \frac{dy}{dt} = \begin{cases} \mu_y y(t), & t \le t_1 \\ - \alpha y(t)^\rho, & t > t_1 \end{cases} \quad \text{with } \frac{db}{dt} = \mu_b b(t) - \gamma y(t) \qquad(3)

Initial conditions: y(0)=y0y(0) = y_0, b(0)=b0b(0) = b_0
Key transition: t1t_1 is the time when b(t1)=0b(t_1) = 0
Derived quantity: y1=y(t1)y_1 = y(t_1)


Closed-Form Solutions

Antibody concentration y(t)y(t)

  • tt1t \le t_1:
    y(t)=y0eμyt y(t) = y_0 e^{\mu_y t}

  • t>t1t > t_1:
    y(t)=y1(1+(ρ1)αy1ρ1(tt1))1ρ1 y(t) = y_1 \left(1 + (\rho - 1)\alpha y_1^{\rho - 1}(t - t_1)\right)^{- \frac{1}{\rho - 1}}

Pathogen load b(t)b(t)

  • tt1t \le t_1:
    b(t)=b0eμbtγy0μyμb(eμyteμbt) b(t) = b_0 e^{\mu_b t} - \frac{\gamma y_0}{\mu_y - \mu_b} \left(e^{\mu_y t} - e^{\mu_b t} \right)

  • t>t1t > t_1:
    b(t)=0 b(t) = 0


Time of Peak Response

Peak Time t1t_1

t1=1μyμblog(1+(μyμb)b0γy0)(4) t_1 = \frac{1}{\mu_y - \mu_b} \log \left( 1 + \frac{(\mu_y - \mu_b) b_0}{\gamma y_0} \right) \qquad(4)

Peak Antibody Level y1y_1

y1=y0eμyt1(5) y_1 = y_0 e^{\mu_y t_1} \qquad(5)


Model Comparison: (Teunis and Eijkeren 2016) vs serodynamics

Table 2: Comparison of Teunis (2016) model and serodynamic’s model assumptions.
Component (Teunis and Eijkeren 2016) serodynamics
Pathogen ODE μ0b(t)cy(t)\mu_0 b(t) - c y(t) μbb(t)γy(t)\mu_b b(t) - \gamma y(t)
Antibody ODE (pre-t1t_1) μy(t)\mu y(t) μyy(t)\mu_y y(t)
Antibody ODE (post-t1t_1) αy(t)r- \alpha y(t)^r αy(t)ρ- \alpha y(t)^\rho
Antibody growth type Pathogen-driven Self-driven exponential
Antibody rate name μ\mu μy\mu_y
t1t_1 formula Uses μ0\mu_0, μ\mu, b0b_0, cc, y0y_0 Uses μb\mu_b, μy\mu_y, etc.

Note:

  • (Teunis and Eijkeren 2016) uses linear clearance: cy(t)c y(t), not bilinear
  • Antibody production is driven by pathogen b(t)b(t)
  • Our model simplifies by assuming self-expanding antibody dynamics

Full Parameter Model (7 Parameters)

Subject-level parameters:

θij𝒩(μj,ΣP,j),θij=[y0,ijb0,ijμb,ijμy,ijγijαijρij] \theta_{ij} \sim \mathcal{N}(\mu_j,\, \Sigma_{P,j}), \quad \theta_{ij} = \begin{bmatrix} y_{0,ij} \\ b_{0,ij} \\ \mu_{b,ij} \\ \mu_{y,ij} \\ \gamma_{ij} \\ \alpha_{ij} \\ \rho_{ij} \end{bmatrix} Where:

  • θij\theta_{ij}: parameter vector for subject ii, biomarker jj
  • μj\mu_j: population-level mean vector for biomarker jj
  • ΣP,j7×7\Sigma_{P,j} \in \mathbb{R}^{7 \times 7}: covariance matrix across parameters for biomarker jj
    • Subscript PP: denotes that this is covariance over the P parameters
    • Subscript jj: indicates the biomarker index

Hyperparameters – Means:

μj𝒩(μhyp,j,Ωhyp,j) \mu_j \sim \mathcal{N}(\mu_{\text{hyp},j},\, \Omega_{\text{hyp},j})


From Full 7 Parameters to 5 Latent Parameters

  • Although the model estimates 7 parameters, for modeling antibody kinetics y(t)y(t), we focus on 5-parameter subset:

y0,t1(derived),y1(derived),α,ρy_0,\ \ t_1 (\text{derived}),\ \ y_1 (\text{derived}),\ \ \alpha,\ \ \rho

  • These 5 parameters are log-transformed into the latent parameters θ_ij\theta\_{ij} used for modeling.

5 Core Parameters Used for Curve Drawing

In this presentation, we focus on 5 key parameters required to draw antibody curves:

  • y0y_0: initial antibody level
  • t1t_1: time of peak antibody response
  • y1y_1: peak antibody level
  • α\alpha: decay rate
  • ρ\rho: shape of decay

Note: t1t_1 and y1y_1 are derived from the full model - These 5 are sufficient for prediction and plotting


Classifying Model Parameters ((Teunis and Eijkeren 2016) Structure)

Estimated Parameters (7 total):

  • Core model parameters (5): μb\mu_b, μy\mu_y, γ\gamma, α\alpha, ρ\rho

  • Initial conditions (2): y0y_0, b0b_0

Derived Quantity (not estimated):

  • y1y_1: peak antibody level computed as y(t1)y(t_1)

Subject-Level Parameters (Latent Version = serodynamics)

Each subject ii and biomarker jj has latent parameters:

θij=[log(y0,ij)log(y1,ijy0,ij)log(t1,ij)log(αij)log(ρij1)]5(6) \theta_{ij} = \begin{bmatrix} \log(y_{0,ij}) \\ \log(y_{1,ij} - y_{0,ij}) \\ \log(t_{1,ij}) \\ \log(\alpha_{ij}) \\ \log(\rho_{ij} - 1) \end{bmatrix} \in \mathbb{R}^5 \qquad(6)

Distribution:

θij𝒩(μj,ΣP,j) \theta_{ij} \sim \mathcal{N}(\mu_j, \Sigma_{P,j}) Where:

  • μj\mu_j: population-level mean vector for biomarker jj
  • ΣP,j5×5\Sigma_{P,j} \in \mathbb{R}^{5 \times 5}: covariance matrix across the P=5P=5 parameters for biomarker jj

Why y1y_1 Is Not Fit Directly

  • y1y_1 is the antibody level at the time the pathogen is cleared:

y1=y(t1)where b(t1)=0 y_1 = y(t_1) \quad \text{where } b(t_1) = 0

  • y1y_1 is not an “input” — it is computed from:
    • μy\mu_y, y0y_0, b0b_0, μb\mu_b, γ\gamma
    • via solution of ODEs to find t1t_1 and compute y(t1)y(t_1)

In other words: y1y_1 is a derived output, not a fit parameter.


How y1y_1 Is Computed

  • y1y_1 is computed by solving the ODE system:

dydt=μyy(t),dbdt=μbb(t)γy(t) \frac{dy}{dt} = \mu_y y(t), \quad \frac{db}{dt} = \mu_b b(t) - \gamma y(t)

  • Evaluate y(t)y(t) at t=t1t = t_1 using ODE solution:

y1=y(t1;μy,y0,b0,μb,γ) y_1 = y(t_1; \mu_y, y_0, b_0, \mu_b, \gamma)


Recap: What We Estimate

Seven model parameters (7-parameter model for full dynamics):

  • μb\mu_b, μy\mu_y, γ\gamma, α\alpha, ρ\rho (biological process)
  • y0y_0, b0b_0 (initial state)

Derived quantity:

  • y1=y(t1)y_1 = y(t_1) — not directly estimated, computed

5-parameter subset for curve visualization:

  • y0y_0, y1y_1, t1t_1, α\alpha, ρ\rho

Hierarchical Bayesian Structure (serodynamics)

Individual parameters:

θij=[log(y0,ij)log(y1,ijy0,ij)log(t1,ij)log(αij)log(ρij1)]𝒩(μj,ΣP,j) \theta_{ij} = \begin{bmatrix} \log(y_{0,ij}) \\ \log(y_{1,ij} - y_{0,ij}) \\ \log(t_{1,ij}) \\ \log(\alpha_{ij}) \\ \log(\rho_{ij} - 1) \end{bmatrix} \sim \mathcal{N}(\mu_j,\, \Sigma_{P,j})

Hyperparameters:

  • μj\mu_j: population-level mean vector for biomarker jj
  • ΣP,jP×P,P=5\Sigma_{P,j} \in \mathbb{R}^{P \times P}, \; P=5: covariance matrix across the parameters for biomarker jj

Subject-Level Parameters: θij\theta_{ij}

θij𝒩(μj,ΣP,j),θij5 \theta_{ij} \sim \mathcal{N}(\mu_j,\, \Sigma_{P,j}), \quad \theta_{ij} \in \mathbb{R}^5

Where:

𝛉ij=[log(y0,ij)log(y1,ijy0,ij)log(t1,ij)log(αij)log(ρij1)],ΣP,jP×P,P=5 \boldsymbol{\theta}_{ij} = \begin{bmatrix} \log(y_{0,ij}) \\ \log(y_{1,ij} - y_{0,ij}) \\ \log(t_{1,ij}) \\ \log(\alpha_{ij}) \\ \log(\rho_{ij} - 1) \end{bmatrix}, \quad \Sigma_{P,j} \in \mathbb{R}^{P \times P}, \; P=5

Each subject ii has a unique 5-parameter vector per biomarker jj, capturing individual-level variation in antibody dynamics.


Hyperparameters: Priors on Population Means

Population-level means:

𝛍j𝒩(𝛍hyp,j,Ωhyp,j) \boldsymbol{\mu}_j \sim \mathcal{N}(\boldsymbol{\mu}_{\mathrm{hyp},j}, \Omega_{\mathrm{hyp},j})

Interpretation:

  • 𝛍j\boldsymbol{\mu}_j: average parameter vector for biomarker jj
  • 𝛍hyp,j\boldsymbol{\mu}_{\mathrm{hyp},j}: prior guess (e.g., vector of zeros)
  • Ωhyp,j\Omega_{\mathrm{hyp},j}: covariance matrix encoding uncertainty

Example:

𝛍hyp,j=0,Ωhyp,j=100I5 \boldsymbol{\mu}_{\mathrm{hyp},j} = 0, \quad \Omega_{\mathrm{hyp},j} = 100 \cdot I_5


Hyperparameters: Priors on Covariance

Covariance across parameters:

ΣP,j1𝒲(Ωj,νj) \Sigma_{P,j}^{-1} \sim \mathcal{W}(\Omega_j, \nu_j)

  • ΣP,j\Sigma_{P,j}: 5×55 \times 5 covariance matrix of subject-level parameters for biomarker jj
  • Ωj\Omega_j: prior scale matrix (dimension 5×55 \times 5)
  • νj\nu_j: degrees of freedom

Example:

Ωj=0.1I5,νj=6 \Omega_j = 0.1 \cdot I_5, \quad \nu_j = 6


Measurement Error and Precision Priors

Observed antibody levels:

log(yobs,ij)𝒩(log(ypred,ij),τj1) \log(y_{\text{obs},ij}) \sim \mathcal{N}(\log(y_{\text{pred},ij}), \tau_j^{-1})

Precision prior:

τjGamma(aj,bj) \tau_j \sim \text{Gamma}(a_j, b_j)

  • τj\tau_j: shared measurement precision for biomarker jj
  • Gamma prior allows flexible noise modeling

Matrix Algebra Computation

Let P=5P = 5 (parameters), BB biomarkers. Then:

Θi=[θi1θi2θiB]P×B \Theta_i = \begin{bmatrix} \theta_{i1} & \theta_{i2} & \cdots & \theta_{iB} \end{bmatrix} \in \mathbb{R}^{P \times B}

Assume:

vec(Θi)𝒩(vec(M),ΣPIB) \text{vec}(\Theta_i) \sim \mathcal{N}(\text{vec}(M), \Sigma_P \otimes I_B)


Matrix Algebra – Simplified Structure

Setup: ΘiP×B\Theta_i \in \mathbb{R}^{P \times B}

Model:

vec(Θi)𝒩(vec(M),ΣPIB) \text{vec}(\Theta_i) \sim \mathcal{N}(\text{vec}(M), \Sigma_P \otimes I_B)

  • ΣP\Sigma_P: 5×5 covariance (same across biomarkers)
  • IBI_B: biomarkers assumed uncorrelated
  • Block-diagonal covariance

Understanding vec(Θi)\text{vec}(\Theta_i)

Each θij5\theta_{ij} \in \mathbb{R}^5:

θij=[log(y0,ij)log(y1,ijy0,ij)log(t1,ij)log(αij)log(ρij1)] \theta_{ij} = \begin{bmatrix} \log(y_{0,ij}) \\ \log(y_{1,ij} - y_{0,ij}) \\ \log(t_{1,ij}) \\ \log(\alpha_{ij}) \\ \log(\rho_{ij} - 1) \end{bmatrix}

Flattening:

vec(Θi)5B×1 \text{vec}(\Theta_i) \in \mathbb{R}^{5B \times 1}


Understanding vec(M)\text{vec}(M)

Let M=[μ1μ2μB]5×BM = [\mu_1\, \mu_2\, \cdots\, \mu_B] \in \mathbb{R}^{5 \times B}

Example for B=3B=3:

M=[μ1,1μ1,2μ1,3μ2,1μ2,2μ2,3μ3,1μ3,2μ3,3μ4,1μ4,2μ4,3μ5,1μ5,2μ5,3] M = \begin{bmatrix} \mu_{1,1} & \mu_{1,2} & \mu_{1,3} \\ \mu_{2,1} & \mu_{2,2} & \mu_{2,3} \\ \mu_{3,1} & \mu_{3,2} & \mu_{3,3} \\ \mu_{4,1} & \mu_{4,2} & \mu_{4,3} \\ \mu_{5,1} & \mu_{5,2} & \mu_{5,3} \end{bmatrix}


Covariance Structure: ΣPIB\Sigma_P \otimes I_B

Cov(vec(Θi))=ΣPIB \text{Cov}(\text{vec}(\Theta_i)) = \Sigma_P \otimes I_B

  • ΣP\Sigma_P: parameter covariance matrix
  • IBI_B: biomarker-wise independence
  • Kronecker product yields block-diagonal matrix

Example: Kronecker Product with P=5P = 5, B=3B = 3

Let:

ΣP=[σy0,y0σy0,y1y0σy0,t1σy0,ασy0,ρ1σy1y0,y0σy1y0,y1y0σy1y0,t1σy1y0,ασy1y0,ρ1σt1,y0σt1,y1y0σt1,t1σt1,ασt1,ρ1σα,y0σα,y1y0σα,t1σα,ασα,ρ1σρ1,y0σρ1,y1y0σρ1,t1σρ1,ασρ1,ρ1],IB=[100010001] \Sigma_P = \begin{bmatrix} \sigma_{y_0,y_0} & \sigma_{y_0,y_1-y_0} & \sigma_{y_0,t_1} & \sigma_{y_0,\alpha} & \sigma_{y_0,\rho-1} \\ \sigma_{y_1-y_0,y_0} & \sigma_{y_1-y_0,y_1-y_0} & \sigma_{y_1-y_0,t_1} & \sigma_{y_1-y_0,\alpha} & \sigma_{y_1-y_0,\rho-1} \\ \sigma_{t_1,y_0} & \sigma_{t_1,y_1-y_0} & \sigma_{t_1,t_1} & \sigma_{t_1,\alpha} & \sigma_{t_1,\rho-1} \\ \sigma_{\alpha,y_0} & \sigma_{\alpha,y_1-y_0} & \sigma_{\alpha,t_1} & \sigma_{\alpha,\alpha} & \sigma_{\alpha,\rho-1} \\ \sigma_{\rho-1,y_0} & \sigma_{\rho-1,y_1-y_0} & \sigma_{\rho-1,t_1} & \sigma_{\rho-1,\alpha} & \sigma_{\rho-1,\rho-1} \end{bmatrix}, \quad I_B = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}

Then:

ΣPIB15×15 \Sigma_P \otimes I_B \in \mathbb{R}^{15 \times 15}


Expanded Matrix: ΣPIB\Sigma_P \otimes I_B

ΣPIB=[ΣP000ΣP000ΣP]15×15 \Sigma_P \otimes I_B = \begin{bmatrix} \Sigma_P & 0 & 0 \\ 0 & \Sigma_P & 0 \\ 0 & 0 & \Sigma_P \end{bmatrix} \in \mathbb{R}^{15 \times 15}

where each block ΣP\Sigma_P is the 5×55 \times 5 covariance across parameters:

ΣP=[σy0,y0σy0,ρ1σρ1,y0σρ1,ρ1] \Sigma_P = \begin{bmatrix} \sigma_{y_0,y_0} & \cdots & \sigma_{y_0,\rho-1} \\ \vdots & \ddots & \vdots \\ \sigma_{\rho-1,y_0} & \cdots & \sigma_{\rho-1,\rho-1} \end{bmatrix}


Next Steps: Modeling Correlation Across Biomarkers

Current Limitation:

  • Biomarkers assumed independent: IBI_B

Planned Extension:

  • Use full covariance ΣB\Sigma_B:

Cov(vec(Θi))=ΣPΣB \text{Cov}(\text{vec}(\Theta_i)) = \Sigma_P \otimes \Sigma_B


Extending to Correlated Biomarkers

Assume P=5P=5, B=3B=3

Define:

ΣP=[σy0,y0σy0,y1y0σy0,t1σy0,ασy0,ρ1σy1y0,y0σy1y0,y1y0σy1y0,t1σy1y0,ασy1y0,ρ1σt1,y0σt1,y1y0σt1,t1σt1,ασt1,ρ1σα,y0σα,y1y0σα,t1σα,ασα,ρ1σρ1,y0σρ1,y1y0σρ1,t1σρ1,ασρ1,ρ1],ΣB=[τ11τ12τ13τ21τ22τ23τ31τ32τ33] \Sigma_P = \begin{bmatrix} \sigma_{y_0,y_0} & \sigma_{y_0,y_1-y_0} & \sigma_{y_0,t_1} & \sigma_{y_0,\alpha} & \sigma_{y_0,\rho-1} \\ \sigma_{y_1-y_0,y_0} & \sigma_{y_1-y_0,y_1-y_0} & \sigma_{y_1-y_0,t_1} & \sigma_{y_1-y_0,\alpha} & \sigma_{y_1-y_0,\rho-1} \\ \sigma_{t_1,y_0} & \sigma_{t_1,y_1-y_0} & \sigma_{t_1,t_1} & \sigma_{t_1,\alpha} & \sigma_{t_1,\rho-1} \\ \sigma_{\alpha,y_0} & \sigma_{\alpha,y_1-y_0} & \sigma_{\alpha,t_1} & \sigma_{\alpha,\alpha} & \sigma_{\alpha,\rho-1} \\ \sigma_{\rho-1,y_0} & \sigma_{\rho-1,y_1-y_0} & \sigma_{\rho-1,t_1} & \sigma_{\rho-1,\alpha} & \sigma_{\rho-1,\rho-1} \end{bmatrix}, \quad \Sigma_B = \begin{bmatrix} \tau_{11} & \tau_{12} & \tau_{13} \\ \tau_{21} & \tau_{22} & \tau_{23} \\ \tau_{31} & \tau_{32} & \tau_{33} \end{bmatrix}

Here:

  • ΣP\Sigma_P: covariance across the 5 parameters (size 5×55 \times 5)
  • ΣB\Sigma_B: covariance across the BB biomarkers (size B×BB \times B)

Kronecker Product Structure: ΣPΣB\Sigma_P \otimes \Sigma_B

Cov(vec(Θi))=ΣPΣB \text{Cov}(\text{vec}(\Theta_i)) = \Sigma_P \otimes \Sigma_B

  • ΣP\Sigma_P: 5×55 \times 5 covariance across parameters
  • ΣB\Sigma_B: B×BB \times B covariance across biomarkers
  • The Kronecker product expands to a (5B)×(5B)(5B) \times (5B) covariance matrix
  • Not block-diagonal — allows both parameter correlations and cross-biomarker correlations

Practical To-Do List (for Chapter 2)

Model Implementation:

  • Define parameter covariance ΣP,j\Sigma_{P,j} (within each biomarker jj)
  • Define biomarker covariance ΣB\Sigma_B (across biomarkers)
  • Full covariance structure: Cov(vec(θi))=ΣPΣB\text{Cov}(\text{vec}(\theta_i)) = \Sigma_P \otimes \Sigma_B
  • Priors: ΣP,j1𝒲(Ωj,νj)\Sigma_{P,j}^{-1} \sim \mathcal{W}(\Omega_j, \nu_j), ΣB1𝒲(ΩB,νB)\Sigma_B^{-1} \sim \mathcal{W}(\Omega_B, \nu_B)

Simulation Study (first step):

  • Generate fake longitudinal data with known ΣP\Sigma_P and ΣB\Sigma_B
  • Fit independence model (IBI_B) vs. correlated model (ΣB\Sigma_B)
  • Evaluate recovery of true covariance structure

Validation on Real Data (next step):

  • Apply to Shigella longitudinal data
  • Compare independence vs. correlated models (DIC, WAIC, posterior predictive checks)
  • Summarize implications for epidemiologic utility

Deliverable:

  • Simulation + model comparison documented in a vignette for the serodynamics package
Teunis, Peter F. M., and J. C. H. van Eijkeren. 2016. “Linking the Seroresponse to Infection to Within-Host Heterogeneity in Antibody Production.” Epidemics 16: 33–39. https://doi.org/10.1016/j.epidem.2016.04.001.