Skip to contents

serocalculator (development version)

Internal

  • The methodology vignette’s LaTeX macros now come from the shared d-morrison/macros git submodule (included via {{< include ../macros/macros.qmd >}}) instead of a local vignettes/articles/_macros.qmd. The deck adopts the shared macro vocabulary (e.g. \dens for the density function in place of the local \pdf). (#534)
  • claude-code-review.yml now sets allowed_bots: github-actions[bot] so the review still runs (and posts feedback) when claude.yml re-dispatches it on an @claude review comment; previously the bot-initiated dispatch aborted with “Workflow initiated by non-human actor”.
  • claude.yml now grants the @claude agent the file tools (Read/Glob/Grep/Edit/MultiEdit/Write) in --allowedTools; previously the agent could run checks/git/gh but not edit files, so it fell back to posting diffs for manual application.
  • Added the iterate Claude Code skill (.claude/skills/iterate/) for driving a PR to a clean review verdict.
  • Ported the @claude agent and PR-review GitHub Actions workflows (plus Claude/Copilot config: CLAUDE.md, .claude/ settings and slash commands, and path-scoped .github/instructions/) from the UCD-SERG qwt template, adapted to this package. (#523)
  • Claude PR review workflow now skips (rather than hard-failing) when triggered by a bot (e.g. claude[bot] pushing a commit). (#519)

Bug fixes

  • sim_pop_data() and sim_pop_data_multi() now produce identical results across operating systems. Simulated inter-infection times are now rounded to whole days, so the number of random draws consumed no longer depends on platform-specific floating-point results of log() (which previously shifted the random-number stream out of sync and made simulated values, and their snapshots, differ between macOS, Windows, and Linux). Simulated values change slightly as a result of this fix. (#447)
  • Removed lingering terminology discrepancies
  • load_noise_params() and load_sr_params() now fail gracefully with informative messages when internet resources are unavailable, complying with CRAN policy (#505)
  • Added Version Crosswalk article to pkgdown website to help users migrate code from v1.3.0 to v1.4.0
    • Provides clear tables comparing old and new function names
    • Includes code examples showing how to update existing code
    • Accessible as a prominent tab in the website navigation

Compatibility

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 ## Dependencies

  • Replaced ggpubr with patchwork for arranging multi-panel plots, removing the indirect ggrepel transitive dependency.

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.