← Back to all sparks
S

serocalculator

INFRA · APIS
Velocity0.0

Estimating Infection Rates from Serological Data

A seroincidence engine grows up: whole API renamed, then clustered survey designs

serologysurvey-designcluster-robustapi-renamescran-complianceepidemiology
Current state
serocalculator turns cross-sectional antibody measurements into infection-rate estimates, and it spent its last two releases making itself safe to depend on. Version 1.4.0 renamed nearly every user-facing function into a consistent est_seroincidence()/sr_params vocabulary; 1.4.1 shipped the migration crosswalk that admits how much that broke. The newest capability is cluster-robust variance estimation for household- and school-based surveys.
Where it's heading
The arc runs from method to instrument. Early releases added example data and plotting; recent ones fix the API surface, satisfy CRAN's offline-failure policy, and extend the estimator to sampling designs field epidemiology actually uses — multi-level clustering, stratification, and the two combined. Each release also carries visible refactoring discipline (one function per file, linting, per-PR website previews) that reads like a package preparing for contributors it does not have yet.
Prediction
With cluster_var and stratum_var now threaded through both est_seroincidence() and est_seroincidence_by(), survey weights are the remaining piece of a complex-survey design the sandwich estimator does not cover. The entries do not name it, so read that as direction rather than a promise.

Recent moves

  1. 3mo ago

    Cluster-robust standard errors for household and school surveys

    ⚡ SPARK

    The release that makes serocalculator usable on the survey designs its users actually field: cluster_var and stratum_var now flow through both estimation functions, and summary.seroincidence() switches to sandwich variance when clustering is declared. It also ships the crosswalk article that finally documents the 1.4.0 rename wave.

    View source ↗
  2. 7mo ago

    Every estimation function renamed, plus a simulation-study workflow

    ⚡ SPARK

    The break in the arc: est.incidence() became estimate_scr() became est_seroincidence(), curve_params became sr_params, load_curve_params() became load_sr_params(). Alongside the renaming, analyze_sims() and autoplot.sim_results() turn the package's simulation helpers into a way to run design studies across sample sizes.

    View source ↗
  3. 1y ago

    Bundled example datasets and a locator to find them

    Groundwork rather than direction: example datasets ship inside the package with serocalculator_example() to locate them, so documentation and tests stop reaching out to external links. A real fix lands too — the antibody response curve was computed incorrectly when r = 1.

    View source ↗