model.Rmd
This document provides a summary of a hierarchical statistical model of antibody kinetics, implemented in Stan. The model is designed to analyse longitudinal titre data, accounting for boosting and waning effects over time. It incorporates individual-level random effects and covariate influences on key model parameters. A full description of the model can be found in the supplementary material in the published paper using the methods described here: Russell TW et al. Real-time estimation of immunological responses against emerging SARS-CoV-2 variants in the UK: a mathematical modelling study. Lancet Infect Dis. 2024 Sep 11:S1473-3099(24)00484-5.
This model is suitable for analysing longitudinal titre data with either lower, upper, both (or no) censoring and incorporates both individual-level variability and arbitrary regression structure to adjust for covariates. Users can adapt the model by specifying appropriate covariates via a R style linear model formula, priors, and data inputs relevant to their study.
The model describes the expected log-transformed titre value for individual at time and titre type , using a piecewise linear function to capture boosting and waning phases:
The expected log-transformed titre value is given by:
where:
The observed log-transformed titre values are modeled as:
where is the measurement error standard deviation.
The model accounts for left-censoring and right-censoring:
Left-Censoring: For observations below detection limit , the likelihood contribution is:
Right-Censoring: For observations above detection limit , the likelihood contribution is:
where is the cumulative distribution function of the standard normal distribution.
For each individual and titre type , the parameters are modeled as:
where:
The prior distributions are specified based on previous studies and domain knowledge: