Skip to content

Releases: CuiweiG/survinger

v0.1.0 — First Stable Release

12 Apr 09:37

Choose a tag to compare

survinger 0.1.0

Design-Adjusted Inference for Pathogen Lineage Surveillance

Installation

remotes::install_github("CuiweiG/survinger@v0.1.0")

Highlights

Core Statistical Methods

  • Hajek prevalence estimator — exact match with survey::svymean (Lumley 2004)
  • Wilson score intervals — 93.4% coverage (Agresti & Coull 1998), never zero-width
  • Right-truncation MLE — 0.5% parameter recovery error (Lawless 2003)
  • Neyman allocation — 27% MSE reduction vs equal allocation (Cochran 1977)
  • Detection formula — exact match with analytical solution (Nicholson et al. 2022)

Validated on Real Data

  • ECDC: 99,093 sequences, 5 EU countries, 40-fold sequencing inequality
  • COG-UK: 65,166 individual sequences, 4 UK nations
  • Design weighting corrects up to 14 percentage points of bias on real data

Package Statistics

Metric Value
Public functions 30
S3 methods 28
Tests 155 (0 failures)
Vignettes 4
Publication figures 10
R CMD check 0 errors, 0 warnings, 0 notes
Package size 2.22 MB

Key Functions

Function Purpose
surv_design() Create surveillance design with inverse-probability weights
surv_lineage_prevalence() Hajek / HT / post-stratified prevalence estimation
surv_optimize_allocation() Neyman allocation (min_mse / max_detection / min_imbalance)
surv_estimate_delay() Right-truncation-corrected delay distribution fitting
surv_adjusted_prevalence() Combined design + delay correction
surv_report() Comprehensive surveillance system diagnostic
surv_quality() One-row quality metrics (Gini, DEFF, detection power)
surv_sensitivity() Cross-method robustness analysis
surv_power_curve() Detection power curve with plot method
tidy() / glance() Broom-style tidyverse integration
theme_survinger() Publication-quality ggplot2 theme

Vignettes

  • Introduction to survinger
  • Optimizing Sequencing Resource Allocation
  • Delay-Adjusted Nowcasting
  • Real-World Case Study: European COVID-19 Genomic Surveillance

References

  • Cochran WG (1977) Sampling Techniques
  • Lumley T (2004) J Stat Software — survey package
  • Wilson EB (1927) JASA — score intervals
  • Agresti A & Coull BA (1998) The American Statistician
  • Nicholson et al. (2022) BMC Bioinformatics — phylosamp
  • Lawless JF (2003) Statistical Models and Methods for Lifetime Data