Skip to content

Commit

Permalink
Automatic Vignette update
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk committed Oct 2, 2024
1 parent 8e2e26c commit 8e6552e
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 90 deletions.
Binary file modified vignettes/epinow-epinow-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 vignettes/epinow-regional_epinow-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 vignettes/epinow-regional_epinow_multiple-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
157 changes: 67 additions & 90 deletions vignettes/epinow.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ This should be replaced with parameters relevant to the system that is being stu

``` r
library("EpiNow2")
#>
#> Attaching package: 'EpiNow2'
#> The following object is masked from 'package:stats':
#>
#> Gamma
options(mc.cores = 4)
reported_cases <- example_confirmed[1:60]
reporting_delay <- LogNormal(mean = 2, sd = 1, max = 10)
Expand All @@ -44,19 +49,12 @@ res <- epinow(reported_cases,
delays = delay_opts(delay),
rt = rt_opts(prior = rt_prior)
)
#> Logging threshold set at INFO for the EpiNow2 logger
#> Writing EpiNow2 logs to the console and: /var/folders/vr/dn4r1_zj417drd1zr9301trw0000gp/T//Rtmpv7UfXL/regional-epinow/2020-04-21.log
#> Logging threshold set at INFO for the EpiNow2.epinow logger
#> Writing EpiNow2.epinow logs to the console and: /var/folders/vr/dn4r1_zj417drd1zr9301trw0000gp/T//Rtmpv7UfXL/epinow/2020-04-21.log
#> DEBUG [2024-06-19 18:04:28] epinow: Running in exact mode for 2000 samples (across 4 chains each with a warm up of 250 iterations each) and 81 time steps of which 7 are a forecast
#> WARN [2024-06-19 18:05:49] 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-19 18:05:49] epinow: Examine the pairs() plot to diagnose sampling problems
#> -
```

``` r
#> Logging threshold set at INFO for the name logger
#> Writing EpiNow2 logs to the console and:
#> '/tmp/RtmpscgdQ0/regional-epinow/2020-04-21.log'.
#> Logging threshold set at INFO for the name logger
#> Writing EpiNow2.epinow logs to the console and:
#> '/tmp/RtmpscgdQ0/epinow/2020-04-21.log'.
res$plots$R
```

Expand Down Expand Up @@ -91,51 +89,38 @@ region_rt <- regional_epinow(
delays = delay_opts(delay),
rt = rt_opts(prior = rt_prior),
)
#> INFO [2024-06-19 18:05:51] Producing following optional outputs: regions, summary, samples, plots, latest
#> Logging threshold set at INFO for the EpiNow2 logger
#> Writing EpiNow2 logs to the console and: /var/folders/vr/dn4r1_zj417drd1zr9301trw0000gp/T//Rtmpv7UfXL/regional-epinow/2020-04-21.log
#> Logging threshold set at INFO for the EpiNow2.epinow logger
#> Writing EpiNow2.epinow logs to: /var/folders/vr/dn4r1_zj417drd1zr9301trw0000gp/T//Rtmpv7UfXL/epinow/2020-04-21.log
#> INFO [2024-06-19 18:05:51] Reporting estimates using data up to: 2020-04-21
#> INFO [2024-06-19 18:05:51] No target directory specified so returning output
#> INFO [2024-06-19 18:05:51] Producing estimates for: testland, realland
#> INFO [2024-06-19 18:05:51] Regions excluded: none
#> DEBUG [2024-06-19 18:05:51] testland: Running in exact mode for 2000 samples (across 4 chains each with a warm up of 250 iterations each) and 81 time steps of which 7 are a forecast
#> WARN [2024-06-19 18:06:27] testland (chain: 1): There were 13 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-19 18:06:27] testland (chain: 1): Examine the pairs() plot to diagnose sampling problems
#> -
#> INFO [2024-06-19 18:06:29] Completed estimates for: testland
#> DEBUG [2024-06-19 18:06:29] realland: Running in exact mode for 2000 samples (across 4 chains each with a warm up of 250 iterations each) and 81 time steps of which 7 are a forecast
#> WARN [2024-06-19 18:07:12] realland (chain: 1): There were 12 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-19 18:07:12] realland (chain: 1): Examine the pairs() plot to diagnose sampling problems
#> -
#> INFO [2024-06-19 18:07:14] Completed estimates for: realland
#> INFO [2024-06-19 18:07:14] Completed regional estimates
#> INFO [2024-06-19 18:07:14] Regions with estimates: 2
#> INFO [2024-06-19 18:07:14] Regions with runtime errors: 0
#> INFO [2024-06-19 18:07:14] Producing summary
#> INFO [2024-06-19 18:07:14] No summary directory specified so returning summary output
#> INFO [2024-06-19 18:07:15] No target directory specified so returning timings
```

``` r
#> INFO [2024-10-02 09:21:23] Producing following optional outputs: regions, summary, samples, plots, latest
#> Logging threshold set at INFO for the name logger
#> Writing EpiNow2 logs to the console and:
#> '/tmp/RtmpscgdQ0/regional-epinow/2020-04-21.log'.
#> Logging threshold set at INFO for the name logger
#> Writing EpiNow2.epinow logs to: '/tmp/RtmpscgdQ0/epinow/2020-04-21.log'.
#> INFO [2024-10-02 09:21:23] Reporting estimates using data up to: 2020-04-21
#> INFO [2024-10-02 09:21:23] No target directory specified so returning output
#> INFO [2024-10-02 09:21:23] Producing estimates for: testland, realland
#> INFO [2024-10-02 09:21:23] Regions excluded: none
#> INFO [2024-10-02 09:22:26] Completed estimates for: testland
#> INFO [2024-10-02 09:24:04] Completed estimates for: realland
#> INFO [2024-10-02 09:24:04] Completed regional estimates
#> INFO [2024-10-02 09:24:04] Regions with estimates: 2
#> INFO [2024-10-02 09:24:04] Regions with runtime errors: 0
#> INFO [2024-10-02 09:24:04] Producing summary
#> INFO [2024-10-02 09:24:04] No summary directory specified so returning summary output
#> INFO [2024-10-02 09:24:04] No target directory specified so returning timings
## summary
region_rt$summary$summarised_results$table
#> Region New infections per day Expected change in daily reports
#> <char> <char> <fctr>
#> 1: realland 2260 (1009 -- 5055) Likely decreasing
#> 2: testland 2237 (952 -- 4767) Likely decreasing
#> Effective reproduction no. Rate of growth Doubling/halving time (days)
#> <char> <char> <char>
#> 1: 0.89 (0.58 -- 1.3) -0.032 (-0.15 -- 0.085) -22 (8.2 -- -4.5)
#> 2: 0.88 (0.58 -- 1.2) -0.032 (-0.15 -- 0.077) -21 (9 -- -4.5)
```

``` r
#> 1: realland 2251 (1309 -- 4051) Likely decreasing
#> 2: testland 2251 (1269 -- 4008) Likely decreasing
#> Effective reproduction no. Rate of growth
#> <char> <char>
#> 1: 0.9 (0.72 -- 1.1) -0.028 (-0.093 -- 0.044)
#> 2: 0.9 (0.7 -- 1.1) -0.027 (-0.099 -- 0.047)
#> Doubling/halving time (days)
#> <char>
#> 1: -25 (16 -- -7.4)
#> 2: -25 (15 -- -7)
## plot
region_rt$summary$plots$R
```
Expand All @@ -155,46 +140,38 @@ region_separate_rt <- regional_epinow(
delays = delay_opts(delay),
rt = rt, gp = gp,
)
#> INFO [2024-06-19 18:07:15] Producing following optional outputs: regions, summary, samples, plots, latest
#> Logging threshold set at INFO for the EpiNow2 logger
#> Writing EpiNow2 logs to the console and: /var/folders/vr/dn4r1_zj417drd1zr9301trw0000gp/T//Rtmpv7UfXL/regional-epinow/2020-04-21.log
#> Logging threshold set at INFO for the EpiNow2.epinow logger
#> Writing EpiNow2.epinow logs to: /var/folders/vr/dn4r1_zj417drd1zr9301trw0000gp/T//Rtmpv7UfXL/epinow/2020-04-21.log
#> INFO [2024-06-19 18:07:15] Reporting estimates using data up to: 2020-04-21
#> INFO [2024-06-19 18:07:15] No target directory specified so returning output
#> INFO [2024-06-19 18:07:15] Producing estimates for: testland, realland
#> INFO [2024-06-19 18:07:15] Regions excluded: none
#> DEBUG [2024-06-19 18:07:15] testland: Running in exact mode for 2000 samples (across 4 chains each with a warm up of 250 iterations each) and 81 time steps of which 7 are a forecast
#> WARN [2024-06-19 18:08:04] testland (chain: 1): 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-19 18:08:04] testland (chain: 1): Examine the pairs() plot to diagnose sampling problems
#> -
#> INFO [2024-06-19 18:08:06] Completed estimates for: testland
#> DEBUG [2024-06-19 18:08:06] realland: Running in exact mode for 2000 samples (across 4 chains each with a warm up of 250 iterations each) and 81 time steps of which 7 are a forecast
#> INFO [2024-06-19 18:08:22] Completed estimates for: realland
#> INFO [2024-06-19 18:08:22] Completed regional estimates
#> INFO [2024-06-19 18:08:22] Regions with estimates: 2
#> INFO [2024-06-19 18:08:22] Regions with runtime errors: 0
#> INFO [2024-06-19 18:08:22] Producing summary
#> INFO [2024-06-19 18:08:22] No summary directory specified so returning summary output
#> INFO [2024-06-19 18:08:23] No target directory specified so returning timings
```

``` r
#> INFO [2024-10-02 09:24:05] Producing following optional outputs: regions, summary, samples, plots, latest
#> Logging threshold set at INFO for the name logger
#> Writing EpiNow2 logs to the console and:
#> '/tmp/RtmpscgdQ0/regional-epinow/2020-04-21.log'.
#> Logging threshold set at INFO for the name logger
#> Writing EpiNow2.epinow logs to: '/tmp/RtmpscgdQ0/epinow/2020-04-21.log'.
#> INFO [2024-10-02 09:24:05] Reporting estimates using data up to: 2020-04-21
#> INFO [2024-10-02 09:24:05] No target directory specified so returning output
#> INFO [2024-10-02 09:24:05] Producing estimates for: testland, realland
#> INFO [2024-10-02 09:24:05] Regions excluded: none
#> INFO [2024-10-02 09:25:18] Completed estimates for: testland
#> INFO [2024-10-02 09:25:50] Completed estimates for: realland
#> INFO [2024-10-02 09:25:50] Completed regional estimates
#> INFO [2024-10-02 09:25:50] Regions with estimates: 2
#> INFO [2024-10-02 09:25:50] Regions with runtime errors: 0
#> INFO [2024-10-02 09:25:50] Producing summary
#> INFO [2024-10-02 09:25:50] No summary directory specified so returning summary output
#> INFO [2024-10-02 09:25:51] No target directory specified so returning timings
## summary
region_separate_rt$summary$summarised_results$table
#> Region New infections per day Expected change in daily reports
#> <char> <char> <fctr>
#> 1: realland 2026 (1030 -- 4393) Likely decreasing
#> 2: testland 2119 (816 -- 5021) Likely decreasing
#> Effective reproduction no. Rate of growth Doubling/halving time (days)
#> <char> <char> <char>
#> 1: 0.85 (0.6 -- 1.2) -0.041 (-0.11 -- 0.048) -17 (15 -- -6.2)
#> 2: 0.86 (0.5 -- 1.3) -0.038 (-0.19 -- 0.095) -18 (7.3 -- -3.6)
```

``` r
#> 1: realland 2077 (1045 -- 4285) Likely decreasing
#> 2: testland 2246 (1324 -- 3909) Likely decreasing
#> Effective reproduction no. Rate of growth
#> <char> <char>
#> 1: 0.85 (0.61 -- 1.2) -0.039 (-0.11 -- 0.044)
#> 2: 0.89 (0.7 -- 1.1) -0.027 (-0.094 -- 0.046)
#> Doubling/halving time (days)
#> <char>
#> 1: -18 (16 -- -6.5)
#> 2: -25 (15 -- -7.3)
## plot
region_separate_rt$summary$plots$R
```
Expand Down

0 comments on commit 8e6552e

Please sign in to comment.