A convenient framework for aggregating and disaggregating continuously
varying parameters (for example, case fatality ratio, with age) for proper
parametrization of lower-resolution compartmental models (for example, with
broad age categories) and subsequent upscaling of model outputs to high resolution
(for example, as needed when calculating age-sensitive measures like years-life-lost).
Methods and application to calculating years of life lost are described in
Goodfellow et al. (2025)
Tools for calculating aggregate parameters and for disaggregating outcomes.
For more complex infectious disease compartmental models, you may need to represent populations groups which discretize or group some continuous feature. For example, your model might use broad age groups, but you might have higher resolution data on critical processes by age. And once you've run your model, you might want outcomes associated with those processes at finer resolution for some follow on analyses.
The paramix package provides convenient functions to create both the correct aggregate parameters and to disaggregate outcomes.
install.packages("paramix")
Or install the development version from GitHub:
remotes::install_github("accidda/paramix")
Briefly, there are three steps:
alembic) based on the parameter function (e.g. the infection fatality ratio as a function of age), the density distribution of the pertinent feature (e.g. the population age pyramid), the model partitions of the feature (e.g. age groups), and the post-processing partitions of the feature (e.g. age in years).blend) from the alembicdistill) to impute higher resolution outcomesWe describe the methodology and applications of paramix in:
Goodfellow L, Pearson CAB, Procter SR (2025). "paramix: An R package for parameter discretisation in compartmental models, with application to calculating years of life lost." PLOS Computational Biology, 21(9): e1013420. https://doi.org/10.1371/journal.pcbi.1013420
To reproduce the complete simulation study, figures, and numerical results from the paper using the bundled GNU Make and renv pipeline, see the vignette:
vignette("reproducing-paper-analysis", package = "paramix")
or read the online reproduction vignette.