Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3,413 changes: 1,710 additions & 1,703 deletions _book/r-session-03.html

Large diffs are not rendered by default.

Binary file modified _book/r-session-03_files/figure-html/unnamed-chunk-30-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _book/r-session-03_files/figure-html/unnamed-chunk-31-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _book/r-session-03_files/figure-html/unnamed-chunk-34-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _book/r-session-03_files/figure-html/unnamed-chunk-35-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _book/r-session-03_files/figure-html/unnamed-chunk-38-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _book/r-session-03_files/figure-html/unnamed-chunk-4-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _book/r-session-03_files/figure-html/unnamed-chunk-43-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _book/r-session-03_files/figure-html/unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion _book/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@
"href": "r-session-03.html#estimating-r_0-problem-background",
"title": "\n8  R Session 03\n",
"section": "\n8.2 Estimating \\(R_0\\) Problem Background",
"text": "8.2 Estimating \\(R_0\\) Problem Background\nSo far in this class we have focused on the theory of infectious disease. Often, however, we will want to apply this theory to particular situations. One of the key applied problems in epidemic modeling is the estimation of \\(R_0\\) from outbreak data. In this session, we study two methods for estimating \\(R_0\\) from an epidemic curve. As a running example, we will use the data on influenza in a British boarding school.\n\nCodeggplot(flu, aes(x = day, y = flu)) +\n geom_line(color = \"slategray4\") +\n geom_point(shape = 21, size = 5, fill = \"slategray4\", alpha = 0.8) +\n labs(x = \"Day\", y = \"Active Influenza Cases\")",
"text": "8.2 Estimating \\(R_0\\) Problem Background\nSo far in this class we have focused on the theory of infectious disease. Often, however, we will want to apply this theory to particular situations. One of the key applied problems in epidemic modeling is the estimation of \\(R_0\\) from outbreak data. In this session, we study two methods for estimating \\(R_0\\) from an epidemic curve. As a running example, we will use the data on influenza in a British boarding school.\n\nCodeggplot(flu, aes(x = day, y = flu)) +\n geom_line(color = \"slategray4\") +\n geom_point(shape = 21, size = 5, fill = \"slategray4\", alpha = 0.8) +\n labs(x = \"Day\", y = \"Active Influenza Cases\")\n\n\n\n\n\n\n\nThe figure above, and the corresponding tabulated outbreak data, report the number of active influenza cases on each day. These are point-in-time counts, or prevalence: the number of students who were sick at that moment. By contrast, the final-size calculation below uses cumulative incidence: the total number of students who became cases at any point during the outbreak. For this boarding school outbreak, the total school size was \\(N = 764\\), and the total number of students who became cases over the full outbreak was \\(Z = 512\\). Because \\(512\\) is a cumulative incidence count, it is not obtained by reading a single value from the prevalence figure or table.",
"crumbs": [
"Day 2",
"<span class='chapter-number'>8</span>  <span class='chapter-title'>R Session 03</span>"
Expand Down
4 changes: 2 additions & 2 deletions _freeze/r-session-03/execute-results/html.json

Large diffs are not rendered by default.

Binary file modified _freeze/r-session-03/figure-html/unnamed-chunk-30-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/r-session-03/figure-html/unnamed-chunk-31-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/r-session-03/figure-html/unnamed-chunk-34-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/r-session-03/figure-html/unnamed-chunk-35-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/r-session-03/figure-html/unnamed-chunk-38-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/r-session-03/figure-html/unnamed-chunk-4-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/r-session-03/figure-html/unnamed-chunk-43-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/r-session-03/figure-html/unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions r-session-03.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ ggplot(flu, aes(x = day, y = flu)) +
labs(x = "Day", y = "Active Influenza Cases")
```

The figure above, and the corresponding tabulated outbreak data, report the number of **active influenza cases** on each day.
These are point-in-time counts, or prevalence: the number of students who were sick at that moment.
By contrast, the final-size calculation below uses cumulative **incidence**: the total number of students who became cases at any point during the outbreak.
For this boarding school outbreak, the total school size was $N = 764$, and the total number of students who became cases over the full outbreak was $Z = 512$.
Because $512$ is a cumulative incidence count, it is not obtained by reading a single value from the prevalence figure or table.

## Estimating $R_0$ From The Final Outbreak Size

Our first approach is to estimate $R_0$ from the final outbreak size.
Expand Down
Binary file modified r-session-03_files/figure-html/unnamed-chunk-30-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified r-session-03_files/figure-html/unnamed-chunk-31-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified r-session-03_files/figure-html/unnamed-chunk-34-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified r-session-03_files/figure-html/unnamed-chunk-35-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified r-session-03_files/figure-html/unnamed-chunk-38-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified r-session-03_files/figure-html/unnamed-chunk-4-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified r-session-03_files/figure-html/unnamed-chunk-43-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified r-session-03_files/figure-html/unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions wrangler.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name = "sismid-module-01-2026"
compatibility_date = "2026-06-22"

[assets]
directory = "./_book"
Loading