We are very excited to announce the release of a new simulist version v0.2.0. Here is an automatically generated summary of the changes in this version.
Second release of simulist, updates the core simulation model and, as a result, the arguments for sim_*() functions for simulating line list data and/or contact table data exported from simulist are updated. The internal package architecture is also refactored.
New features
External
create_config()now returns a new element in the list:$network. By defaultcreate_config()returnsnetwork = "adjusted", which assumes the simulation is a random network and samples contacts with an excess degree distribution (see Details in?create_config()). The network effect can be changed to"unadjusted"to switch off the network effect.$networkis checked internally (in.sim_network_bp()) and will error if not valid (#60).- Package architecture diagram is added to
design-principles.Rmd(#66). - lintr GitHub action workflow (
lint-changed-files.yaml) is added to the suite of continuous integration workflows (#68). - Transmission chain visualisation is added to
vis-linelist.Rmd(#70).
Internal
.sim_network_bp()is added as an internal function and replacesbpmodels::chain_sim()as the core simulation model producing contacted and infected individuals.{bpmodels}is removed as a dependency as a result (#60)..sample_names()is added as an internal function to utiliserandomNames::randomNames()to produce more unique names thanrandomNames(..., sample.with.replacement = FALSE).- Refactor of internal simulation architecture replaced
.sim_bp_linelist(),.sim_clinical_linelist()and.sim_contacts_tbl()with.sim_internal()(#66). - The
sim_utils.Rfile was renamed toutils.R(#66) and the emptycreate_linelist.Rfile was removed (#72). .add_date_contact()argumentoutbreak_start_dateis nowNULLby default instead of missing (#82).- Regression tests of
sim_*()functions now use snapshot testing for more detailed data checking (#65). - Internal testing data (
testdata) files have been updated, as has thetestdata/README.mdwith instructions (#64).
Breaking changes
Randserial_intervalarguments have been removed fromsim_linelist(),sim_contacts()andsim_outbreak()functions and insteadcontact_distribution,contact_intervalandprob_infectare used to parameterise the simulation. Documentation, both functions and vignettes, have been updated with these changes (#60).- The
contact_distributionargument insim_*()functions requires a density function if supplied as an anonymous function. Information is added tosimulist.Rmdto explain this. - The line list output from
sim_linelist()now uses column headersexinstead ofgender. The contacts table output fromsim_contacts()andsim_outbreak()now uses column headersageandsexinstead ofcnt_ageandcnt_gender(#60, #79). contact_distributionis redefined and redocumented as the distribution of contacts per individual, rather than the number of contacts that do not get infected as it was in v0.1.0.row.namesfor<data.frame>s output bysim_linelist(),sim_contacts()andsim_outbreak()are now sequential from1:nrows(#63).
Bug fixes
sim_contacts()now correctly runs with an age-structured population. In the previous version (v0.1.0),sim_contacts()did not call.check_age_df()and as a result the function errored, this is fixed as of PR #81.
Deprecated and defunct
- None
Acknowledgements
Many thanks to the contributors to this release, either from issues, code contributions, reviews or discussions (listed in alphabetical order):
@adamkucharski, @avallecam, @Bisaloo, @chartgerink, @jamesmbaazam, @pratikunterwegs, and @sbfnk.
Reuse
Citation
BibTeX citation:
@online{epiverse-trace_development_team2024,
author = {Epiverse-TRACE development team, The},
title = {Simulist V0.2.0},
date = {2024-02-23},
url = {https://epiverse-trace.github.io/posts/simulist_v0.2.0/},
langid = {en}
}
For attribution, please cite this work as:
Epiverse-TRACE development team, The. 2024. “Simulist
V0.2.0.” February 23, 2024. https://epiverse-trace.github.io/posts/simulist_v0.2.0/.