Breaking changes
-
Social contact matrices from socialmixr must no longer be transposed before use.
model_default()andmodel_vacamole()now transpose the contact matrix internally, so matrices should be passed topopulation()exactly associalmixr::contact_matrix()returns them (#259, @bahadzie). Existing code that callst()on the contact matrix will continue to run without error, but will silently give incorrect results because the matrix is then transposed twice; remove thet()call when upgrading. Vignettes, examples, tests and the README have been updated accordingly. -
The
new_infections()argumentcompartments_from_susceptiblehas been renamed toexclude_compartments(#272, @bahadzie). Code that passes this argument by name must be updated.
Model functions
- The compiled code underlying the ODE models has been migrated from Rcpp/C++ to odin (#263, @bahadzie, @alxsrobert). The 'default', 'Vacamole' and 'diphtheria' ODE systems are now declared as odin models under
inst/odin/, odin has been added toImports, and the previous C++ sources, their Rcpp bindings and the C++ linting workflow have been removed.
Classes
Helper functions
- Added the
combine_populations()function to combine age-structured populations into a new population object (#262, @alxsrobert).
Bug fixes
- Fixed
model_default(),model_vacamole(), andmodel_diphtheria()silently dropping or merging demographic groups in their output when a model had 10 or more demographic groups (e.g. when combining four or more populations), caused by the demography group index being truncated to a single digit while reshaping model output (#278, @avallecam).
Documentation
-
Added a
modelling-populationsvignette on how to combine age-structured populations (#262, @alxsrobert). -
Corrected the equations documented for
model_vacamole()in the function documentation and the 'Modelling a two-dose vaccination campaign' vignette (#273, @bahadzie). -
Corrected the vaccination rate used in the 'Modelling vaccination' vignette (#268, @bahadzie).
-
Corrected the Figure 1 caption in the 'Modelling multiple interventions' vignette (#270, @bahadzie).
-
Fixed rendering of equations on the pkgdown website for pkgdown >= 2.1.0 (#249, @Bisaloo).
-
Fixed broken links in the README (#293, @joshwlambert).
-
Updated the documentation of the internal argument-preparation helpers for the 'Vacamole' and 'diphtheria' models (#274, @bahadzie).
-
Set the pkgdown website
development: modetounreleasedso that the single website matches the development version of the package installed by most users, and added website favicons (#275, @joshwlambert).
Package
-
Added
dependabot.ymlto.github/to automate updating GitHub actions workflow versions (#283, @joshwlambert). -
The minimum required R version is now 4.1.0, as the package's examples, vignettes and tests use the base R pipe (
|>). -
Updated calls to
socialmixr::contact_matrix()to use the renamedage_limitsargument, replacing the defunctage.limits, and accepted the resulting snapshot changes (#280, @avallecam). -
Fixed the
codecov/codecov-actionvariables in the test coverage workflow (#289, @joshwlambert), addedpersist-credentials: falseto fix theupdate-citation-cffworkflow (#290, @joshwlambert), and removed an unused workflow inherited from the package template (#244, @pratikunterwegs). -
Updated all uses of socialmixr across tests, vignettes, examples and the README to pass
survey_popexplicitly tosocialmixr::contact_matrix(), removing deprecation warnings introduced in socialmixr 0.6.0; the minimum socialmixr version is now 0.6.0 (#281, @joshwlambert). Demography data is now taken from the wpp2024 package (added toSuggestsandRemotes, installed from GitHub) rather than from the deprecatedsocialmixr::survey_country_population(), which is backed by the outdated wpp2017 data. The population year is 2006, matching the year in which the socialmixr POLYMOD participants were surveyed; previously socialmixr used 2005, as wpp2017 only provides population estimates at five-year intervals. Demography vectors and symmetric contact matrices in examples, vignettes and tests therefore change slightly (by up to ~1%) relative to previous releases, reflecting the revised UN estimates for 2006.