Skip to content

Commit

Permalink
differences for PR #64
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jun 17, 2024
1 parent 9f50d63 commit 237773c
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 81 deletions.
16 changes: 8 additions & 8 deletions delays-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ generate(covid_serialint, times = 10)
```

```{.output}
[1] 5.534646 9.250007 4.254961 3.436661 13.323202 3.695330 5.519206
[8] 4.682234 2.675111 2.804316
[1] 2.457223 3.312394 3.729976 8.068636 5.572314 2.445653 7.738652
[8] 1.729764 3.979938 10.168464
```

::::::::: instructor
Expand Down Expand Up @@ -472,10 +472,10 @@ epinow_estimates_cg <- epinow(
```

```{.output}
WARN [2024-06-17 21:44:52] epinow: There were 5 divergent transitions after warmup. See
WARN [2024-06-17 21:52:58] epinow: There were 1 divergent transitions after warmup. See
https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
to find out why this is a problem and how to eliminate them. -
WARN [2024-06-17 21:44:52] epinow: Examine the pairs() plot to diagnose sampling problems
WARN [2024-06-17 21:52:58] epinow: Examine the pairs() plot to diagnose sampling problems
-
```

Expand Down Expand Up @@ -601,10 +601,10 @@ epinow_estimates_cgi <- epinow(
```

```{.output}
WARN [2024-06-17 21:46:37] epinow: There were 10 divergent transitions after warmup. See
WARN [2024-06-17 21:54:39] epinow: There were 16 divergent transitions after warmup. See
https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
to find out why this is a problem and how to eliminate them. -
WARN [2024-06-17 21:46:37] epinow: Examine the pairs() plot to diagnose sampling problems
WARN [2024-06-17 21:54:39] epinow: Examine the pairs() plot to diagnose sampling problems
-
```

Expand Down Expand Up @@ -748,10 +748,10 @@ epinow_estimates_egi <- epinow(
```

```{.output}
WARN [2024-06-17 21:50:29] epinow: There were 2 divergent transitions after warmup. See
WARN [2024-06-17 21:58:08] epinow: There were 6 divergent transitions after warmup. See
https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
to find out why this is a problem and how to eliminate them. -
WARN [2024-06-17 21:50:29] epinow: Examine the pairs() plot to diagnose sampling problems
WARN [2024-06-17 21:58:08] epinow: Examine the pairs() plot to diagnose sampling problems
-
```

Expand Down
Binary file modified fig/delays-functions-rendered-unnamed-chunk-16-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 fig/delays-functions-rendered-unnamed-chunk-17-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 fig/delays-functions-rendered-unnamed-chunk-20-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 fig/delays-functions-rendered-unnamed-chunk-21-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 fig/quantify-transmissibility-rendered-unnamed-chunk-16-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 fig/quantify-transmissibility-rendered-unnamed-chunk-17-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 fig/quantify-transmissibility-rendered-unnamed-chunk-20-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 md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"episodes/delays-functions.Rmd" "3b40b34577112812aa7b872f728500f4" "site/built/delays-functions.md" "2024-06-17"
"instructors/instructor-notes.md" "ca3834a1b0f9e70c4702aa7a367a6bb5" "site/built/instructor-notes.md" "2024-05-21"
"learners/reference.md" "106717912e909a7c8d9e3e8fea48e17d" "site/built/reference.md" "2024-05-21"
"learners/setup.md" "4c235f3d33132e2ec79d813610a29bf3" "site/built/setup.md" "2024-06-17"
"learners/setup.md" "cbdffa25710b2423d1551706af39b13d" "site/built/setup.md" "2024-06-17"
"profiles/learner-profiles.md" "31b503c4b5bd1f0960ada730eca4a25e" "site/built/learner-profiles.md" "2024-05-21"
"renv/profiles/lesson-requirements/renv.lock" "201f9680fa680a90ab80d294ff8143d0" "site/built/renv.lock" "2024-05-21"
123 changes: 59 additions & 64 deletions quantify-transmissibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,7 @@ estimates <- epinow(
```

```{.output}
WARN [2024-06-17 20:58:18] epinow: There were 9 divergent transitions after warmup. See
https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
to find out why this is a problem and how to eliminate them. -
WARN [2024-06-17 20:58:18] epinow: Examine the pairs() plot to diagnose sampling problems
-
WARN [2024-06-17 20:58:19] epinow: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
WARN [2024-06-17 21:05:15] epinow: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
Running the chains for more iterations may help. See
https://mc-stan.org/misc/warnings.html#bulk-ess -
```
Expand Down Expand Up @@ -458,22 +453,22 @@ summary(estimates)
```{.output}
measure estimate
<char> <char>
1: New confirmed cases by infection date 7301 (4102 -- 12577)
1: New confirmed cases by infection date 7234 (3944 -- 12739)
2: Expected change in daily cases Likely decreasing
3: Effective reproduction no. 0.9 (0.57 -- 1.3)
4: Rate of growth -0.013 (-0.064 -- 0.035)
5: Doubling/halving time (days) -52 (20 -- -11)
3: Effective reproduction no. 0.9 (0.56 -- 1.3)
4: Rate of growth -0.014 (-0.066 -- 0.038)
5: Doubling/halving time (days) -51 (18 -- -11)
```

As these estimates are based on partial data, they have a wide uncertainty interval.

+ From the summary of our analysis we see that the expected change in daily cases is Likely decreasing with the estimated new confirmed cases 7301 (4102 -- 12577).
+ From the summary of our analysis we see that the expected change in daily cases is Likely decreasing with the estimated new confirmed cases 7234 (3944 -- 12739).

+ The effective reproduction number $R_t$ estimate (on the last date of the data) is 0.9 (0.57 -- 1.3).
+ The effective reproduction number $R_t$ estimate (on the last date of the data) is 0.9 (0.56 -- 1.3).

+ The exponential growth rate of case numbers is -0.013 (-0.064 -- 0.035).
+ The exponential growth rate of case numbers is -0.014 (-0.066 -- 0.038).

+ The doubling time (the time taken for case numbers to double) is -52 (20 -- -11).
+ The doubling time (the time taken for case numbers to double) is -51 (18 -- -11).

::::::::::::::::::::::::::::::::::::: callout
### `Expected change in daily cases`
Expand Down Expand Up @@ -542,17 +537,17 @@ estimates_regional <- regional_epinow(
```

```{.output}
INFO [2024-06-17 20:58:21] Producing following optional outputs: regions, summary, samples, plots, latest
INFO [2024-06-17 20:58:22] Reporting estimates using data up to: 2020-04-28
INFO [2024-06-17 20:58:22] No target directory specified so returning output
INFO [2024-06-17 20:58:22] Producing estimates for: East Midlands, East of England, England, London, North East, North West, Northern Ireland, Scotland, South East, South West, Wales, West Midlands, Yorkshire and The Humber
INFO [2024-06-17 20:58:22] Regions excluded: none
INFO [2024-06-17 21:43:06] Completed regional estimates
INFO [2024-06-17 21:43:06] Regions with estimates: 13
INFO [2024-06-17 21:43:06] Regions with runtime errors: 0
INFO [2024-06-17 21:43:06] Producing summary
INFO [2024-06-17 21:43:06] No summary directory specified so returning summary output
INFO [2024-06-17 21:43:07] No target directory specified so returning timings
INFO [2024-06-17 21:05:18] Producing following optional outputs: regions, summary, samples, plots, latest
INFO [2024-06-17 21:05:18] Reporting estimates using data up to: 2020-04-28
INFO [2024-06-17 21:05:18] No target directory specified so returning output
INFO [2024-06-17 21:05:18] Producing estimates for: East Midlands, East of England, England, London, North East, North West, Northern Ireland, Scotland, South East, South West, Wales, West Midlands, Yorkshire and The Humber
INFO [2024-06-17 21:05:18] Regions excluded: none
INFO [2024-06-17 21:51:03] Completed regional estimates
INFO [2024-06-17 21:51:03] Regions with estimates: 13
INFO [2024-06-17 21:51:03] Regions with runtime errors: 0
INFO [2024-06-17 21:51:03] Producing summary
INFO [2024-06-17 21:51:03] No summary directory specified so returning summary output
INFO [2024-06-17 21:51:03] No target directory specified so returning timings
```

```r
Expand All @@ -562,49 +557,49 @@ estimates_regional$summary$summarised_results$table
```{.output}
Region New confirmed cases by infection date
<char> <char>
1: East Midlands 344 (212 -- 553)
2: East of England 542 (327 -- 833)
3: England 3548 (2229 -- 5440)
4: London 294 (189 -- 457)
5: North East 253 (144 -- 427)
6: North West 555 (331 -- 861)
7: Northern Ireland 43 (22 -- 82)
8: Scotland 290 (167 -- 526)
9: South East 593 (348 -- 987)
10: South West 418 (302 -- 611)
11: Wales 95 (63 -- 141)
12: West Midlands 269 (150 -- 490)
13: Yorkshire and The Humber 477 (290 -- 778)
1: East Midlands 350 (215 -- 560)
2: East of England 533 (339 -- 846)
3: England 3576 (2184 -- 5585)
4: London 296 (189 -- 465)
5: North East 254 (150 -- 434)
6: North West 558 (325 -- 881)
7: Northern Ireland 44 (23 -- 86)
8: Scotland 292 (154 -- 536)
9: South East 591 (359 -- 986)
10: South West 419 (288 -- 597)
11: Wales 95 (65 -- 141)
12: West Midlands 275 (149 -- 487)
13: Yorkshire and The Humber 479 (285 -- 773)
Expected change in daily cases Effective reproduction no.
<fctr> <char>
1: Likely increasing 1.2 (0.85 -- 1.6)
2: Likely increasing 1.2 (0.83 -- 1.6)
3: Likely decreasing 0.91 (0.64 -- 1.2)
4: Likely decreasing 0.79 (0.56 -- 1.1)
5: Likely decreasing 0.91 (0.59 -- 1.3)
6: Likely decreasing 0.86 (0.58 -- 1.2)
7: Likely decreasing 0.64 (0.38 -- 1)
8: Likely decreasing 0.92 (0.62 -- 1.4)
1: Likely increasing 1.2 (0.86 -- 1.6)
2: Likely increasing 1.2 (0.84 -- 1.6)
3: Likely decreasing 0.92 (0.63 -- 1.3)
4: Likely decreasing 0.79 (0.55 -- 1.1)
5: Likely decreasing 0.91 (0.62 -- 1.3)
6: Likely decreasing 0.87 (0.57 -- 1.2)
7: Likely decreasing 0.65 (0.39 -- 1.1)
8: Likely decreasing 0.92 (0.57 -- 1.4)
9: Stable 0.99 (0.67 -- 1.4)
10: Increasing 1.4 (1.1 -- 1.8)
11: Decreasing 0.57 (0.41 -- 0.78)
12: Likely decreasing 0.7 (0.44 -- 1.1)
13: Stable 1 (0.71 -- 1.4)
Rate of growth Doubling/halving time (days)
<char> <char>
1: 0.024 (-0.021 -- 0.069) 29 (10 -- -33)
2: 0.022 (-0.023 -- 0.066) 31 (10 -- -30)
3: -0.012 (-0.052 -- 0.029) -59 (24 -- -13)
4: -0.029 (-0.066 -- 0.011) -24 (62 -- -10)
5: -0.012 (-0.06 -- 0.036) -58 (19 -- -12)
6: -0.018 (-0.063 -- 0.021) -38 (32 -- -11)
7: -0.053 (-0.1 -- 0.0044) -13 (160 -- -6.8)
8: -0.011 (-0.056 -- 0.043) -64 (16 -- -12)
9: -0.00099 (-0.048 -- 0.048) -700 (14 -- -14)
10: 0.047 (0.015 -- 0.085) 15 (8.1 -- 46)
11: -0.065 (-0.094 -- -0.031) -11 (-22 -- -7.4)
12: -0.042 (-0.088 -- 0.011) -16 (61 -- -7.8)
13: 0.0026 (-0.041 -- 0.051) 260 (14 -- -17)
11: Decreasing 0.57 (0.42 -- 0.77)
12: Likely decreasing 0.71 (0.44 -- 1.1)
13: Stable 1 (0.7 -- 1.4)
Rate of growth Doubling/halving time (days)
<char> <char>
1: 0.025 (-0.018 -- 0.071) 28 (9.8 -- -38)
2: 0.021 (-0.022 -- 0.066) 33 (11 -- -32)
3: -0.011 (-0.054 -- 0.033) -63 (21 -- -13)
4: -0.029 (-0.067 -- 0.012) -24 (58 -- -10)
5: -0.012 (-0.056 -- 0.039) -56 (18 -- -12)
6: -0.018 (-0.064 -- 0.022) -38 (32 -- -11)
7: -0.051 (-0.1 -- 0.0082) -13 (85 -- -6.9)
8: -0.01 (-0.064 -- 0.048) -67 (14 -- -11)
9: -0.0013 (-0.048 -- 0.049) -530 (14 -- -15)
10: 0.047 (0.011 -- 0.083) 15 (8.3 -- 64)
11: -0.064 (-0.092 -- -0.032) -11 (-21 -- -7.5)
12: -0.041 (-0.089 -- 0.012) -17 (58 -- -7.8)
13: 0.0027 (-0.043 -- 0.049) 260 (14 -- -16)
```

```r
Expand Down
11 changes: 6 additions & 5 deletions setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,18 @@ Also check out the [glossary](../reference.md) for any terms you may be unfamili

### Epiverse-TRACE R packages

Our strategy is to gradually incorporate specialised **R packages** into our traditional analysis pipeline. These packages should fill the gaps in these epidemiology-specific tasks in response to outbreaks.
Our strategy is to gradually incorporate specialised **R packages** into traditional analysis pipeline. These packages should fill the gaps in these epidemiology-specific tasks in response to outbreaks.

![In **R**, the fundamental unit of shareable code is the **package**. A package bundles together code, data, documentation, and tests and is easy to share with others ([Wickham and Bryan, 2023](https://r-pkgs.org/introduction.html))](episodes/fig/pkgs-hexlogos-2.png)
![In **R**, the fundamental unit of shareable code is the **package**. A package bundles together code, data, documentation, and tests and is easy to share with others ([Wickham and Bryan, 2023](https://r-pkgs.org/introduction.html))](episodes/fig/pkgs-hexlogos-2.png).

:::::::::::::::::::::::::::: prereq

This course assumes intermediate R knowledge. This workshop is for you if:

- You can use the magrittr pipe `%>%` and/or native pipe `|>`
- You are familiar with functions from `{dplyr}`, `{tidyr}`, and `{ggplot2}`
- You can read data into R, transform and reshape data, and make a wide variety of graphs
- You are familiar with functions from `{dplyr}`, `{tidyr}`, and `{ggplot2}`
- You can use the magrittr pipe `%>%` and/or native pipe `|>`.


We expect participants to have some exposure to basic Statistical, Mathematical and Epidemic theory concepts, but NOT intermediate or expert familiarity with modeling.

Expand Down Expand Up @@ -74,7 +75,7 @@ This tutorial requires **R version 4.0.0 or later**.

To check if your R version is up to date:

- In RStudio your R version will be printed in [the console window](https://docs.posit.co/ide/user/ide/guide/code/console.html). Or run `sessionInfo()` there.
- In RStudio your R version will be printed in [the console window](https://docs.posit.co/ide/user/ide/guide/code/console.html). Or run `sessionInfo()`.

- **To update R**, download and install the latest version from the [R project website](https://cran.rstudio.com/) for your operating system.

Expand Down
6 changes: 3 additions & 3 deletions simple-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ base::print(peaks_nb)
# A data frame: 3 × 6
sex observed_peak observed_count lower_ci median upper_ci
* <chr> <date> <int> <date> <date> <date>
1 female 2020-03-26 1314 2020-03-18 2020-03-23 2020-03-31
2 male 2020-03-27 1299 2020-03-19 2020-03-26 2020-03-30
3 unknown 2020-04-10 32 2020-03-24 2020-04-07 2020-04-20
1 female 2020-03-26 1314 2020-03-18 2020-03-25 2020-03-29
2 male 2020-03-27 1299 2020-03-18 2020-03-24 2020-03-31
3 unknown 2020-04-10 32 2020-03-24 2020-04-07 2020-04-11
```


Expand Down

0 comments on commit 237773c

Please sign in to comment.