Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1c361e1
Initial plan
Copilot Jan 13, 2026
b1f321f
Add cluster-robust standard error support to est_seroincidence()
Copilot Jan 13, 2026
46173c1
Fix linting issues and finalize cluster-robust SE implementation
Copilot Jan 13, 2026
28b7b67
Refactor call to compute_cluster_robust_var
d-morrison Jan 14, 2026
44a6bbb
Merge branch 'main' into copilot/adjust-seroincidence-likelihood
d-morrison Jan 15, 2026
a19f661
Fix linting issues: replace base R messaging with cli functions
Copilot Jan 15, 2026
fa216ed
Add se_type column and compute_icc() function for clustering analysis
Copilot Jan 15, 2026
8567a5e
Fix est_seroincidence_by to support clustering and add comprehensive …
Copilot Jan 15, 2026
01a66de
Extend compute_icc to work with est_seroincidence_by and add antigen_…
Copilot Jan 16, 2026
b8a557c
Add min/max cluster sizes and support multi-level clustering
Copilot Jan 16, 2026
1c821c7
Merge branch 'main' into copilot/adjust-seroincidence-likelihood
d-morrison Jan 20, 2026
6034fcf
Address code review feedback: fix cli formatting, line lengths, use m…
Copilot Jan 20, 2026
5e153a3
Refactor clustering code: decompose into separate files per code orga…
Copilot Jan 20, 2026
d0fc3d1
Merge branch 'main' into copilot/adjust-seroincidence-likelihood
kaiemjoy Jan 21, 2026
11c3e00
Remove compute_icc() functionality per user request
Copilot Jan 27, 2026
81b14c3
Address code review feedback: remove ICC mentions, extract validation…
Copilot Jan 27, 2026
f7b3426
Add clustering documentation to vignettes and mark man/ as linguist-g…
Copilot Jan 27, 2026
33a6826
Increment version and perform quality control checks
Copilot Jan 27, 2026
449f29a
Update vignettes per code review: use actual SEES data variables with…
Copilot Jan 27, 2026
96c583d
Merge branch 'main' into copilot/adjust-seroincidence-likelihood
d-morrison Jan 27, 2026
c275206
Fix workflow failures: increment version and address linting issues
Copilot Jan 27, 2026
7f824b1
fix lints
d-morrison Jan 27, 2026
c4cb76b
Add version management guidelines to copilot-instructions.md
Copilot Jan 27, 2026
ab6426a
Merge branch 'main' into copilot/adjust-seroincidence-likelihood
d-morrison Jan 27, 2026
49b95e1
Fix vignette rendering error: filter noise params to Pakistan in clus…
Copilot Jan 27, 2026
3700ee6
Refactor methodology vignette: move cluster-robust SE content to subfile
Copilot Jan 27, 2026
e36a5ef
Improve cluster-robust SE documentation: add symbol definitions and m…
Copilot Jan 27, 2026
3fee00a
more
d-morrison Jan 28, 2026
e02d6e7
Enhance vignette: add cross-references and comparisons for clustering…
Copilot Jan 28, 2026
47aa916
Remove multi-level clustering example from enteric fever vignette
Copilot Jan 28, 2026
2cfeb4b
Update conclusions to include clustering findings and reflect actual …
Copilot Feb 6, 2026
10c99ae
Add cluster-robust CIs and p-value to conclusions with country compar…
Copilot Feb 6, 2026
31e636b
Expand cluster-robust comparison to include all 3 countries with pair…
Copilot Feb 6, 2026
581e276
Fix blank CI bounds in vignette conclusions by correcting column names
Copilot Feb 6, 2026
856a241
Merge branch 'main' into copilot/adjust-seroincidence-likelihood
kristinawlai Mar 19, 2026
2522ff0
Update version number to 1.4.0.9007
kristinawlai Mar 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: serocalculator
Title: Estimating Infection Rates from Serological Data
Version: 1.4.0.9003
Version: 1.4.0.9004

Copilot AI Jan 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version number has been incremented from 1.4.0.9003 to 1.4.0.9004, but according to the PR description, the version was bumped to 1.4.0.9002. This inconsistency suggests either the PR description is outdated or multiple version bumps have occurred. Please ensure version numbers are correctly documented and match the PR description.

Suggested change
Version: 1.4.0.9004
Version: 1.4.0.9002

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 6034fcf. Version number corrected to 1.4.0.9002 to match the PR description.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always make sure the dev version is one past the main branch. make a note about this in copilot-instructions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in c4cb76b. Added "Version Management" section to copilot-instructions.md with clear guidelines:

  • Always ensure PR dev version is one higher than main branch
  • How to check and increment version using usethis::use_version('dev')
  • Explanation of why this matters for version-check.yaml workflow
  • Step-by-step process for version management before PR review

Authors@R: c(
person("Kristina", "Lai", , "kwlai@ucdavis.edu", role = c("aut", "cre")),
person("Chris", "Orwa", role = "aut"),
Expand Down Expand Up @@ -77,7 +77,7 @@ Encoding: UTF-8
Language: en-US
LazyData: true
NeedsCompilation: no
Roxygen: list(markdown = TRUE, roclets = c("collate", "rd", "namespace", "devtag::dev_roclet"))
Roxygen: list(markdown = TRUE, roclets = c("collate", "rd", "namespace"))
Comment thread
d-morrison marked this conversation as resolved.
RoxygenNote: 7.3.3
Remotes:
d-morrison/snapr
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ S3method(autoplot,seroincidence)
S3method(autoplot,seroincidence.by)
S3method(autoplot,sim_results)
S3method(autoplot,summary.seroincidence.by)
S3method(print,icc_seroincidence)
S3method(print,icc_seroincidence.by)
S3method(compare_seroincidence,default)
S3method(compare_seroincidence,seroincidence)
S3method(compare_seroincidence,seroincidence.by)
Expand All @@ -25,6 +27,7 @@ export(as_pop_data)
export(as_sr_params)
export(autoplot)
export(check_pop_data)
export(compute_icc)
export(compare_seroincidence)
export(count_strata)
export(est.incidence)
Expand Down
34 changes: 34 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,43 @@
# serocalculator (development version)

## New features

* Added `compute_icc()` function to calculate the Intraclass Correlation Coefficient
(ICC) for seroincidence estimates from clustered sampling designs. The ICC measures
the proportion of variance due to between-cluster variation. Now works with both
`seroincidence` and `seroincidence.by` objects, calculating ICC for each stratum
when used with stratified analyses.
* Added `cluster_var` and `stratum_var` parameters to `est_seroincidence_by()` to
support cluster-robust standard error estimation in stratified analyses.
* `compute_icc()` output now includes antigen isotypes information to clarify which
antibodies were used in the analysis.
* `compute_icc()` output now includes minimum and maximum cluster sizes in addition
to the average, providing more complete information about cluster size distribution.
The print method now clarifies that cluster size refers to "observations per cluster".
* `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. Note: ICC calculation only supports single-level
clustering and will produce an error if multiple cluster variables are provided.

## 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()`.

# serocalculator 1.4.0

## New features

* Added support for cluster-robust standard errors in `est_seroincidence()` through
new `cluster_var` and `stratum_var` parameters. 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.
* Added `compare_seroincidence()` function for statistical comparison of seroincidence rates
- Performs two-sample z-tests to compare seroincidence estimates
- Returns `htest` format when comparing two single estimates
Expand Down
Loading
Loading