diff --git a/vignettes/estimate_infections_options-bp-1.png b/vignettes/estimate_infections_options-bp-1.png index c9321d83e..ed85e2be1 100644 Binary files a/vignettes/estimate_infections_options-bp-1.png and b/vignettes/estimate_infections_options-bp-1.png differ diff --git a/vignettes/estimate_infections_options-data-1.png b/vignettes/estimate_infections_options-data-1.png index bf7ecd5d4..890c77b2a 100644 Binary files a/vignettes/estimate_infections_options-data-1.png and b/vignettes/estimate_infections_options-data-1.png differ diff --git a/vignettes/estimate_infections_options-default-1.png b/vignettes/estimate_infections_options-default-1.png index 5974b6f85..43d4f6640 100644 Binary files a/vignettes/estimate_infections_options-default-1.png and b/vignettes/estimate_infections_options-default-1.png differ diff --git a/vignettes/estimate_infections_options-fixed-1.png b/vignettes/estimate_infections_options-fixed-1.png index 8e82ea94e..5effeb7b9 100644 Binary files a/vignettes/estimate_infections_options-fixed-1.png and b/vignettes/estimate_infections_options-fixed-1.png differ diff --git a/vignettes/estimate_infections_options-gp_projection-1.png b/vignettes/estimate_infections_options-gp_projection-1.png index 2137d64b6..b99ad89eb 100644 Binary files a/vignettes/estimate_infections_options-gp_projection-1.png and b/vignettes/estimate_infections_options-gp_projection-1.png differ diff --git a/vignettes/estimate_infections_options-lower_accuracy-1.png b/vignettes/estimate_infections_options-lower_accuracy-1.png index d5cce6902..cb4508892 100644 Binary files a/vignettes/estimate_infections_options-lower_accuracy-1.png and b/vignettes/estimate_infections_options-lower_accuracy-1.png differ diff --git a/vignettes/estimate_infections_options-no_delays-1.png b/vignettes/estimate_infections_options-no_delays-1.png index d3792e1d0..4796f3eac 100644 Binary files a/vignettes/estimate_infections_options-no_delays-1.png and b/vignettes/estimate_infections_options-no_delays-1.png differ diff --git a/vignettes/estimate_infections_options-nonparametric-1.png b/vignettes/estimate_infections_options-nonparametric-1.png index 9586e7a32..d5f43c24a 100644 Binary files a/vignettes/estimate_infections_options-nonparametric-1.png and b/vignettes/estimate_infections_options-nonparametric-1.png differ diff --git a/vignettes/estimate_infections_options-susceptible_depletion-1.png b/vignettes/estimate_infections_options-susceptible_depletion-1.png index 58a9a484f..832ed885e 100644 Binary files a/vignettes/estimate_infections_options-susceptible_depletion-1.png and b/vignettes/estimate_infections_options-susceptible_depletion-1.png differ diff --git a/vignettes/estimate_infections_options-truncation-1.png b/vignettes/estimate_infections_options-truncation-1.png index a1848d3b4..16ea046f4 100644 Binary files a/vignettes/estimate_infections_options-truncation-1.png and b/vignettes/estimate_infections_options-truncation-1.png differ diff --git a/vignettes/estimate_infections_options-weekly_rw-1.png b/vignettes/estimate_infections_options-weekly_rw-1.png index 069381639..2420b2bd9 100644 Binary files a/vignettes/estimate_infections_options-weekly_rw-1.png and b/vignettes/estimate_infections_options-weekly_rw-1.png differ diff --git a/vignettes/estimate_infections_options.Rmd b/vignettes/estimate_infections_options.Rmd index 4f7301366..251a0a6c9 100644 --- a/vignettes/estimate_infections_options.Rmd +++ b/vignettes/estimate_infections_options.Rmd @@ -182,26 +182,22 @@ def <- estimate_infections(reported_cases, delays = delay_opts(delay), rt = rt_opts(prior = rt_prior) ) -#> Warning: There were 2 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. -#> Warning: Examine the pairs() plot to diagnose sampling problems # summarise results summary(def) -#> measure estimate -#> -#> 1: New infections per day 2268 (1284 -- 4221) -#> 2: Expected change in daily reports Likely decreasing -#> 3: Effective reproduction no. 0.9 (0.71 -- 1.1) -#> 4: Rate of growth -0.027 (-0.095 -- 0.052) -#> 5: Doubling/halving time (days) -26 (13 -- -7.3) +#> measure estimate +#> +#> 1: New infections per day 2275 (1353 -- 3811) +#> 2: Expected change in reports Likely decreasing +#> 3: Effective reproduction no. 0.9 (0.72 -- 1.1) +#> 4: Rate of growth -0.029 (-0.095 -- 0.042) +#> 5: Doubling/halving time (days) -24 (16 -- -7.3) # elapsed time (in seconds) get_elapsed_time(def$fit) #> warmup sample -#> chain:1 23.529 18.991 -#> chain:2 29.477 28.414 -#> chain:3 37.718 18.235 -#> chain:4 38.292 14.125 +#> chain:1 27.360 27.048 +#> chain:2 33.805 19.095 +#> chain:3 33.064 24.555 +#> chain:4 34.182 29.239 # summary plot plot(def) ``` @@ -222,20 +218,20 @@ agp <- estimate_infections(reported_cases, ) # summarise results summary(agp) -#> measure estimate -#> -#> 1: New infections per day 2257 (1280 -- 4106) -#> 2: Expected change in daily reports Likely decreasing -#> 3: Effective reproduction no. 0.9 (0.71 -- 1.1) -#> 4: Rate of growth -0.029 (-0.099 -- 0.048) -#> 5: Doubling/halving time (days) -24 (15 -- -7) +#> measure estimate +#> +#> 1: New infections per day 2304 (1392 -- 3704) +#> 2: Expected change in reports Likely decreasing +#> 3: Effective reproduction no. 0.91 (0.73 -- 1.1) +#> 4: Rate of growth -0.026 (-0.094 -- 0.038) +#> 5: Doubling/halving time (days) -27 (18 -- -7.4) # elapsed time (in seconds) get_elapsed_time(agp$fit) #> warmup sample -#> chain:1 28.106 18.768 -#> chain:2 24.271 19.359 -#> chain:3 22.602 30.107 -#> chain:4 26.954 20.210 +#> chain:1 17.897 28.005 +#> chain:2 19.861 28.966 +#> chain:3 17.763 28.042 +#> chain:4 20.268 17.828 # summary plot plot(agp) ``` @@ -260,20 +256,20 @@ dep <- estimate_infections(reported_cases, ) # summarise results summary(dep) -#> measure estimate -#> -#> 1: New infections per day 2259 (1304 -- 4143) -#> 2: Expected change in daily reports Likely decreasing -#> 3: Effective reproduction no. 0.9 (0.71 -- 1.1) -#> 4: Rate of growth -0.029 (-0.096 -- 0.051) -#> 5: Doubling/halving time (days) -24 (14 -- -7.2) +#> measure estimate +#> +#> 1: New infections per day 2243 (1358 -- 3690) +#> 2: Expected change in reports Likely decreasing +#> 3: Effective reproduction no. 0.9 (0.72 -- 1.1) +#> 4: Rate of growth -0.028 (-0.096 -- 0.041) +#> 5: Doubling/halving time (days) -25 (17 -- -7.2) # elapsed time (in seconds) get_elapsed_time(dep$fit) #> warmup sample -#> chain:1 42.625 23.562 -#> chain:2 31.544 20.825 -#> chain:3 40.299 20.096 -#> chain:4 38.885 20.701 +#> chain:1 31.359 27.996 +#> chain:2 27.694 20.757 +#> chain:3 30.441 30.463 +#> chain:4 24.466 33.262 # summary plot plot(dep) ``` @@ -312,20 +308,20 @@ trunc <- estimate_infections(reported_cases, ) # summarise results summary(trunc) -#> measure estimate -#> -#> 1: New infections per day 4273 (2401 -- 8111) -#> 2: Expected change in daily reports Likely increasing -#> 3: Effective reproduction no. 1.1 (0.87 -- 1.4) -#> 4: Rate of growth 0.032 (-0.043 -- 0.13) -#> 5: Doubling/halving time (days) 21 (5.5 -- -16) +#> measure estimate +#> +#> 1: New infections per day 4605 (2739 -- 8031) +#> 2: Expected change in reports Likely increasing +#> 3: Effective reproduction no. 1.1 (0.91 -- 1.4) +#> 4: Rate of growth 0.044 (-0.029 -- 0.13) +#> 5: Doubling/halving time (days) 16 (5.4 -- -24) # elapsed time (in seconds) get_elapsed_time(trunc$fit) #> warmup sample -#> chain:1 32.460 19.479 -#> chain:2 36.538 18.114 -#> chain:3 24.322 31.656 -#> chain:4 30.328 20.364 +#> chain:1 30.744 21.518 +#> chain:2 30.152 25.655 +#> chain:3 29.763 21.657 +#> chain:4 32.512 24.148 # summary plot plot(trunc) ``` @@ -346,22 +342,26 @@ project_rt <- estimate_infections(reported_cases, prior = rt_prior, future = "project" ) ) +#> Warning: 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. +#> Warning: Examine the pairs() plot to diagnose sampling problems # summarise results summary(project_rt) -#> measure estimate -#> -#> 1: New infections per day 2277 (1300 -- 4159) -#> 2: Expected change in daily reports Likely decreasing -#> 3: Effective reproduction no. 0.9 (0.71 -- 1.1) -#> 4: Rate of growth -0.028 (-0.098 -- 0.052) -#> 5: Doubling/halving time (days) -25 (13 -- -7) +#> measure estimate +#> +#> 1: New infections per day 2290 (1342 -- 3845) +#> 2: Expected change in reports Likely decreasing +#> 3: Effective reproduction no. 0.91 (0.71 -- 1.1) +#> 4: Rate of growth -0.027 (-0.1 -- 0.047) +#> 5: Doubling/halving time (days) -26 (15 -- -6.7) # elapsed time (in seconds) get_elapsed_time(project_rt$fit) #> warmup sample -#> chain:1 41.792 18.973 -#> chain:2 34.302 20.610 -#> chain:3 38.729 18.627 -#> chain:4 33.687 20.569 +#> chain:1 36.939 33.936 +#> chain:2 36.873 31.181 +#> chain:3 33.125 31.308 +#> chain:4 38.751 32.907 # summary plot plot(project_rt) ``` @@ -381,20 +381,20 @@ fixed <- estimate_infections(reported_cases, ) # summarise results summary(fixed) -#> measure estimate -#> -#> 1: New infections per day 15719 (9135 -- 27752) -#> 2: Expected change in daily reports Increasing -#> 3: Effective reproduction no. 1.2 (1.1 -- 1.3) -#> 4: Rate of growth 0.048 (0.033 -- 0.062) -#> 5: Doubling/halving time (days) 14 (11 -- 21) +#> measure estimate +#> +#> 1: New infections per day 18976 (10957 -- 34164) +#> 2: Expected change in reports Increasing +#> 3: Effective reproduction no. 1.2 (1.2 -- 1.3) +#> 4: Rate of growth 0.054 (0.039 -- 0.069) +#> 5: Doubling/halving time (days) 13 (10 -- 18) # elapsed time (in seconds) get_elapsed_time(fixed$fit) #> warmup sample -#> chain:1 3.135 2.078 -#> chain:2 3.071 1.926 -#> chain:3 2.708 1.865 -#> chain:4 3.069 1.897 +#> chain:1 1.594 0.992 +#> chain:2 1.876 0.987 +#> chain:3 1.766 1.037 +#> chain:4 1.544 1.030 # summary plot plot(fixed) ``` @@ -427,20 +427,20 @@ bkp <- estimate_infections(bp_cases, ) # summarise results summary(bkp) -#> measure estimate -#> -#> 1: New infections per day 2363 (1947 -- 2891) -#> 2: Expected change in daily reports Decreasing -#> 3: Effective reproduction no. 0.89 (0.86 -- 0.92) -#> 4: Rate of growth -0.027 (-0.034 -- -0.02) -#> 5: Doubling/halving time (days) -26 (-35 -- -20) +#> measure estimate +#> +#> 1: New infections per day 2306 (1936 -- 2750) +#> 2: Expected change in reports Decreasing +#> 3: Effective reproduction no. 0.89 (0.86 -- 0.91) +#> 4: Rate of growth -0.028 (-0.034 -- -0.022) +#> 5: Doubling/halving time (days) -25 (-32 -- -20) # elapsed time (in seconds) get_elapsed_time(bkp$fit) #> warmup sample -#> chain:1 4.777 4.458 -#> chain:2 4.579 4.862 -#> chain:3 4.953 5.284 -#> chain:4 4.385 5.380 +#> chain:1 2.636 4.027 +#> chain:2 3.373 3.806 +#> chain:3 2.776 3.795 +#> chain:4 2.942 4.100 # summary plot plot(bkp) ``` @@ -462,20 +462,20 @@ rw <- estimate_infections(reported_cases, ) # summarise results summary(rw) -#> measure estimate -#> -#> 1: New infections per day 2079 (1032 -- 4439) -#> 2: Expected change in daily reports Likely decreasing -#> 3: Effective reproduction no. 0.86 (0.62 -- 1.2) -#> 4: Rate of growth -0.038 (-0.12 -- 0.047) -#> 5: Doubling/halving time (days) -18 (15 -- -6) +#> measure estimate +#> +#> 1: New infections per day 1991 (1048 -- 3838) +#> 2: Expected change in reports Likely decreasing +#> 3: Effective reproduction no. 0.85 (0.62 -- 1.1) +#> 4: Rate of growth -0.043 (-0.11 -- 0.036) +#> 5: Doubling/halving time (days) -16 (19 -- -6.1) # elapsed time (in seconds) get_elapsed_time(rw$fit) #> warmup sample -#> chain:1 9.655 15.971 -#> chain:2 9.614 16.314 -#> chain:3 9.230 12.979 -#> chain:4 10.482 16.692 +#> chain:1 7.163 15.637 +#> chain:2 9.244 15.295 +#> chain:3 7.316 15.986 +#> chain:4 7.954 14.878 # summary plot plot(rw) ``` @@ -494,20 +494,20 @@ no_delay <- estimate_infections( ) # summarise results summary(no_delay) -#> measure estimate -#> -#> 1: New infections per day 2801 (2409 -- 3289) -#> 2: Expected change in daily reports Decreasing -#> 3: Effective reproduction no. 0.89 (0.8 -- 0.98) -#> 4: Rate of growth -0.03 (-0.064 -- 0.00074) -#> 5: Doubling/halving time (days) -23 (940 -- -11) +#> measure estimate +#> +#> 1: New infections per day 2794 (2397 -- 3260) +#> 2: Expected change in reports Decreasing +#> 3: Effective reproduction no. 0.89 (0.8 -- 0.98) +#> 4: Rate of growth -0.031 (-0.063 -- 0.00098) +#> 5: Doubling/halving time (days) -22 (710 -- -11) # elapsed time (in seconds) get_elapsed_time(no_delay$fit) #> warmup sample -#> chain:1 40.605 34.244 -#> chain:2 44.485 36.481 -#> chain:3 41.615 37.638 -#> chain:4 38.434 40.516 +#> chain:1 31.395 30.495 +#> chain:2 38.438 31.528 +#> chain:3 30.985 36.548 +#> chain:4 33.849 31.746 # summary plot plot(no_delay) ``` @@ -532,20 +532,20 @@ non_parametric <- estimate_infections(reported_cases, ) # summarise results summary(non_parametric) -#> measure estimate -#> -#> 1: New infections per day 2730 (2688 -- 2774) -#> 2: Expected change in daily reports Decreasing -#> 3: Effective reproduction no. 0.92 (0.86 -- 0.96) -#> 4: Rate of growth -0.024 (-0.025 -- -0.022) -#> 5: Doubling/halving time (days) -29 (-31 -- -28) +#> measure estimate +#> +#> 1: New infections per day 2544 (2503 -- 2585) +#> 2: Expected change in reports Decreasing +#> 3: Effective reproduction no. 0.92 (0.83 -- 0.96) +#> 4: Rate of growth -0.024 (-0.025 -- -0.022) +#> 5: Doubling/halving time (days) -29 (-31 -- -28) # elapsed time (in seconds) get_elapsed_time(non_parametric$fit) #> warmup sample -#> chain:1 4.475 0.516 -#> chain:2 4.663 0.641 -#> chain:3 4.827 0.549 -#> chain:4 4.169 0.725 +#> chain:1 3.815 0.613 +#> chain:2 3.805 0.585 +#> chain:3 3.811 0.634 +#> chain:4 3.538 0.640 # summary plot plot(non_parametric) ```