Skip to contents

serocalculator (development version)

New features

  • Added cluster_var and stratum_var parameters to est_seroincidence() and est_seroincidence_by() to support cluster-robust standard error estimation. When cluster_var is specified, summary.seroincidence() automatically computes cluster-robust (sandwich) variance estimates to account for within-cluster correlation in clustered sampling designs such as household or school-based surveys.
  • cluster_var parameter now accepts multiple variables (e.g., c("school", "classroom")) for multi-level clustered sampling designs. Cluster-robust standard errors will account for all specified clustering levels.

Bug fixes

  • Fixed column naming issue in summary.seroincidence() where cluster-robust standard errors caused [] notation in column names (SE[,1] instead of SE).
  • Added se_type column to summary.seroincidence() output to clearly indicate whether “standard” or “cluster-robust” standard errors are being used.
  • Fixed est_seroincidence_by() to properly pass cluster and stratum variables through to stratified analyses. Previously, these variables were dropped during data stratification, causing errors when trying to use clustering with est_seroincidence_by().

Code organization

  • Refactored clustering-related code following package organization policies:
    • Moved .compute_cluster_robust_var() to R/compute_cluster_robust_var.R
    • Each function now in its own file for better maintainability and git history
  • Updated copilot-instructions.md with code organization policies

serocalculator 1.4.0

CRAN release: 2025-12-11

New features

Bug fixes

  • Fixed CRAN errors (#464)
  • Fixed stratification issue in enteric fever vignette (#418)
  • Fixed issue in graph.curve.params() where MCMC samples with the same iteration number from different MCMC chains would get merged by ggplot2::aes(group = iter) (#382)

Internal changes

serocalculator 1.3.0

CRAN release: 2025-01-25

New features

  • Removed function ‘get_additional_data()’ (#332)

  • Updated documentation examples to include csv files (#328)

  • Added csv files for use in documentation examples (#329)

  • Added serocalculator_example() function to help locate example data files (#329)

  • Fixed a bug in computing the antibody response curve when r=1r=1 (#323)

  • Added example datasets with documentation for examples and testing (#314)

  • Improved error messaging for autoplot.pop_data() (#234).

  • Clarified package installation instructions in scrub typhus vignette (#234).

  • Add as_noise_params (#228)

  • Updated simulate_xsectionalData.Rmd (linting, removing deprecated functions) (#289)

  • Added default value for antigen_isos argument in log_likelihood() (#286)

  • Updated enteric fever example article with upgraded code and visualizations (#290)

  • Added Methodology vignette (#284, #302, #303)

  • Added template for reporting Issues (from usethis::use_tidy_issue_template()) (#270)

  • Added template for pull requests (from https://github.com/bcgov/ssdtools) (#265)

Internal changes

serocalculator 1.2.0

  • Added test-summary.pop_data test

  • Modified test-est.incidence test

  • Added stratification to summary.pop_data

  • Added verbose option for check_pop_data(), changing default behavior to avoid printing an OK message.

serocalculator 1.1.0

serocalculator 1.0.1

serocalculator 1.0.0

  • Moved underlying methods to serocalculator vignette

serocalculator 0.5.0

serocalculator 0.4.0

  • plot() methods have been renamed to autoplot(), matching general convention for ggplot2-based graphics.

  • added visualization of curve parameters

  • sim.cs() now has format argument to specify long or wide format for output.

serocalculator 0.3.2

Fixed bug in passing antigen_isos from est.incidence.by() to est.incidence().

serocalculator 0.3.1

Rolled back required R version from 4.2 to 4.1

serocalculator 0.3.0

  • Fixed stability and documentation-clarity issues after initial tester feedback.

serocalculator 0.2.0 (never formally incremented in DESCRIPTION)

  • Added new vignettes.

serocalculator 0.1.0

Forking from the seroincidence package and adding Teunis et al 2020 approach.