Skip to content

Commit 553a868

Browse files
Update PR #499 preview
1 parent de1e072 commit 553a868

File tree

7 files changed

+110
-9
lines changed

7 files changed

+110
-9
lines changed
27 Bytes
Loading

preview/pr499/articles/scrubTyphus_example.html

Lines changed: 74 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

preview/pr499/articles/scrubTyphus_example.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ knitr::kable(comparison2,
472472

473473
Statistical comparisons of seroincidence rates between strata
474474

475-
Let’s visualize our seroincidence estimates by strata.
475+
Finally, let’s summarize and visualize seroincidence rates by strata.
476476

477477
``` r
478478
# Plot seroincidence estimates
@@ -487,6 +487,36 @@ est2df <- summary(est2)
487487

488488
est_comb <- rbind(estdf, est2df)
489489

490+
### Summary table with seroincidence rates and 95% CIs
491+
summary_table <- est_comb |>
492+
mutate(
493+
`Seroincidence Rate` = sprintf("%.1f", incidence.rate*1000),
494+
`95% CI` = sprintf("[%.1f, %.1f]", CI.lwr*1000, CI.upr*1000),
495+
`Age Group` = ageQ
496+
#`Standard Error` = sprintf("%.4f", SE)
497+
) %>%
498+
arrange(ageQ) %>%
499+
select(country, ageQ, `Seroincidence Rate`, `95% CI`)
500+
501+
knitr::kable(summary_table,
502+
caption = "Scrub typhus seroincidence rates by country, per 1000 person-years")
503+
```
504+
505+
| country | ageQ | Seroincidence Rate | 95% CI |
506+
|:--------|:--------|:-------------------|:---------------|
507+
| Nepal | 0-17 | 4.9 | \[3.4, 7.2\] |
508+
| India | 18-29 | 8.8 | \[4.4, 17.7\] |
509+
| Nepal | 18-29 | 13.6 | \[9.5, 19.4\] |
510+
| India | 30-49 | 15.0 | \[11.9, 18.9\] |
511+
| India | 50-89 | 28.4 | \[23.3, 34.6\] |
512+
| India | Overall | 19.9 | \[17.3, 23.0\] |
513+
| Nepal | Overall | 7.5 | \[5.8, 9.7\] |
514+
515+
Scrub typhus seroincidence rates by country, per 1000 person-years
516+
517+
``` r
518+
519+
490520
# Create barplot (rescale incidence rate and CIs)
491521
ggplot(est_comb, aes(y = ageQ, x = incidence.rate * 1000, fill = country)) +
492522
geom_bar(
-63 Bytes
Loading

preview/pr499/copilot-instructions.html

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

preview/pr499/pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ articles:
88
articles/serocalculator: serocalculator.html
99
articles/simulate_xsectionalData: simulate_xsectionalData.html
1010
articles/test-quarto-article: test-quarto-article.html
11-
last_built: 2026-01-28T22:36Z
11+
last_built: 2026-01-29T00:15Z
1212
urls:
1313
reference: https://ucd-serg.github.io/serocalculator/reference
1414
article: https://ucd-serg.github.io/serocalculator/articles

preview/pr499/search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)