diff --git a/index.html b/index.html index 416a63ce4..d03042c6f 100644 --- a/index.html +++ b/index.html @@ -98,7 +98,7 @@

Lifecycle: maturing R-CMD-check codecov metacran downloads

-

MIT license GitHub contributors universe GitHub commits DOI

+

MIT license GitHub contributors universe GitHub commits DOI

This package estimates the time-varying reproduction number, growth rate, and doubling time using a range of open-source tools (Abbott et al.), and current best practices (Gostic et al.). It aims to help users avoid some of the limitations of naive implementations in a framework that is informed by community feedback and is actively supported.

It estimates the time-varying reproduction number on cases by date of infection (using a similar approach to that implemented in {EpiEstim}). Imputed infections are then mapped to observed data (for example cases by date of report) via a series of uncertain delay distributions (in the examples in the package documentation these are an incubation period and a reporting delay) and a reporting model that can include weekly periodicity.

Uncertainty is propagated from all inputs into the final parameter estimates, helping to mitigate spurious findings. This is handled internally. The time-varying reproduction estimates and the uncertain generation time also give time-varying estimates of the rate of growth.

diff --git a/news/index.html b/news/index.html index 908b7a561..1272a6af2 100644 --- a/news/index.html +++ b/news/index.html @@ -61,7 +61,7 @@

EpiNow2 1.4.0

CRAN release: 2023-09-26

-

This package contains some bug fixes, minor new features, and the initial stages of some broader improvement to future handling of delay distributions.

+

This release contains some bug fixes, minor new features, and the initial stages of some broader improvement to future handling of delay distributions.

Breaking changes

diff --git a/reference/bootstrapped_dist_fit.html b/reference/bootstrapped_dist_fit.html index 285cbf3fc..e80992040 100644 --- a/reference/bootstrapped_dist_fit.html +++ b/reference/bootstrapped_dist_fit.html @@ -167,7 +167,7 @@

Examples#> Warning: `samples` must be at least 1000. Now setting it to 1000 internally. out #> -#> Uncertain lognormal distribution with (untruncated) logmean 1.5 (SD 0.094) and logSD 1.2 (SD 0.098) +#> Uncertain lognormal distribution with (untruncated) logmean 1.4 (SD 0.08) and logSD 1.1 (SD 0.083) #> # } diff --git a/reference/create_stan_args.html b/reference/create_stan_args.html index d719ced71..3bd3c22d8 100644 --- a/reference/create_stan_args.html +++ b/reference/create_stan_args.html @@ -964,7 +964,7 @@

Examples#> [1] FALSE #> #> $seed -#> [1] 62456371 +#> [1] 35453657 #> #> $future #> [1] FALSE @@ -1827,7 +1827,7 @@

Examples#> [1] FALSE #> #> $seed -#> [1] 69855628 +#> [1] 36003562 #> #> $future #> [1] FALSE diff --git a/reference/dist_fit.html b/reference/dist_fit.html index b1d56e16f..a6b156559 100644 --- a/reference/dist_fit.html +++ b/reference/dist_fit.html @@ -136,8 +136,8 @@

Examples#> #> SAMPLING FOR MODEL 'dist_fit' NOW (CHAIN 1). #> Chain 1: -#> Chain 1: Gradient evaluation took 6.1e-05 seconds -#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.61 seconds. +#> Chain 1: Gradient evaluation took 5.8e-05 seconds +#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.58 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: @@ -184,15 +184,18 @@

Examples#> Chain 1: Iteration: 1950 / 2000 [ 97%] (Sampling) #> Chain 1: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 1: -#> Chain 1: Elapsed Time: 0.197 seconds (Warm-up) -#> Chain 1: 0.199 seconds (Sampling) -#> Chain 1: 0.396 seconds (Total) +#> Chain 1: Elapsed Time: 0.193 seconds (Warm-up) +#> Chain 1: 0.189 seconds (Sampling) +#> Chain 1: 0.382 seconds (Total) #> Chain 1: #> #> SAMPLING FOR MODEL 'dist_fit' NOW (CHAIN 2). +#> Chain 2: Rejecting initial value: +#> Chain 2: Log probability evaluates to log(0), i.e. negative infinity. +#> Chain 2: Stan can't start sampling from this initial value. #> Chain 2: -#> Chain 2: Gradient evaluation took 5.8e-05 seconds -#> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.58 seconds. +#> Chain 2: Gradient evaluation took 5.5e-05 seconds +#> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.55 seconds. #> Chain 2: Adjust your expectations accordingly! #> Chain 2: #> Chain 2: @@ -240,18 +243,18 @@

Examples#> Chain 2: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 2: #> Chain 2: Elapsed Time: 0.198 seconds (Warm-up) -#> Chain 2: 0.203 seconds (Sampling) -#> Chain 2: 0.401 seconds (Total) +#> Chain 2: 0.159 seconds (Sampling) +#> Chain 2: 0.357 seconds (Total) #> Chain 2: #> Inference for Stan model: dist_fit. #> 2 chains, each with iter=2000; warmup=1000; thin=1; #> post-warmup draws per chain=1000, total post-warmup draws=2000. #> #> mean se_mean sd 2.5% 25% 50% 75% 97.5% n_eff Rhat -#> lambda[1] 2.52 0.01 0.38 1.88 2.27 2.49 2.74 3.40 822 1 -#> lp__ -17.30 0.02 0.66 -19.26 -17.42 -17.03 -16.88 -16.84 768 1 +#> lambda[1] 2.93 0.02 0.53 2.03 2.55 2.89 3.26 4.03 565 1 +#> lp__ -11.68 0.03 0.75 -13.82 -11.86 -11.40 -11.21 -11.15 631 1 #> -#> Samples were drawn using NUTS(diag_e) at Tue Sep 26 14:27:48 2023. +#> Samples were drawn using NUTS(diag_e) at Tue Sep 26 15:26:16 2023. #> For each parameter, n_eff is a crude measure of effective sample size, #> and Rhat is the potential scale reduction factor on split chains (at #> convergence, Rhat=1). @@ -265,8 +268,8 @@

Examples#> #> SAMPLING FOR MODEL 'dist_fit' NOW (CHAIN 1). #> Chain 1: -#> Chain 1: Gradient evaluation took 0.0003 seconds -#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 3 seconds. +#> Chain 1: Gradient evaluation took 0.000262 seconds +#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 2.62 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: @@ -313,15 +316,15 @@

Examples#> Chain 1: Iteration: 1950 / 2000 [ 97%] (Sampling) #> Chain 1: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 1: -#> Chain 1: Elapsed Time: 2.282 seconds (Warm-up) -#> Chain 1: 2.908 seconds (Sampling) -#> Chain 1: 5.19 seconds (Total) +#> Chain 1: Elapsed Time: 2.197 seconds (Warm-up) +#> Chain 1: 2.099 seconds (Sampling) +#> Chain 1: 4.296 seconds (Total) #> Chain 1: #> #> SAMPLING FOR MODEL 'dist_fit' NOW (CHAIN 2). #> Chain 2: -#> Chain 2: Gradient evaluation took 0.000249 seconds -#> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 2.49 seconds. +#> Chain 2: Gradient evaluation took 0.000253 seconds +#> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 2.53 seconds. #> Chain 2: Adjust your expectations accordingly! #> Chain 2: #> Chain 2: @@ -368,22 +371,25 @@

Examples#> Chain 2: Iteration: 1950 / 2000 [ 97%] (Sampling) #> Chain 2: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 2: -#> Chain 2: Elapsed Time: 2.348 seconds (Warm-up) -#> Chain 2: 1.769 seconds (Sampling) -#> Chain 2: 4.117 seconds (Total) +#> Chain 2: Elapsed Time: 2.451 seconds (Warm-up) +#> Chain 2: 2.167 seconds (Sampling) +#> Chain 2: 4.618 seconds (Total) #> Chain 2: +#> Warning: 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 #> Inference for Stan model: dist_fit. #> 2 chains, each with iter=2000; warmup=1000; thin=1; #> post-warmup draws per chain=1000, total post-warmup draws=2000. #> #> mean se_mean sd 2.5% 25% 50% 75% 97.5% n_eff Rhat -#> alpha_raw[1] 0.82 0.02 0.53 0.06 0.42 0.74 1.13 2.09 467 1 -#> beta_raw[1] 0.93 0.02 0.55 0.08 0.52 0.87 1.27 2.17 527 1 -#> alpha[1] 6.79 0.02 0.53 6.02 6.39 6.71 7.10 8.05 467 1 -#> beta[1] 6.99 0.02 0.55 6.14 6.57 6.92 7.33 8.23 527 1 -#> lp__ -12.13 0.07 1.34 -15.54 -12.75 -11.72 -11.17 -10.75 374 1 +#> alpha_raw[1] 0.86 0.03 0.55 0.04 0.45 0.79 1.17 2.13 283 1.01 +#> beta_raw[1] 1.02 0.03 0.56 0.11 0.58 0.96 1.40 2.23 352 1.01 +#> alpha[1] 6.41 0.03 0.55 5.60 6.01 6.35 6.72 7.69 283 1.01 +#> beta[1] 6.55 0.03 0.56 5.64 6.11 6.49 6.93 7.76 352 1.01 +#> lp__ -12.45 0.11 1.41 -16.25 -13.04 -12.01 -11.41 -10.99 156 1.02 #> -#> Samples were drawn using NUTS(diag_e) at Tue Sep 26 14:27:57 2023. +#> Samples were drawn using NUTS(diag_e) at Tue Sep 26 15:26:25 2023. #> For each parameter, n_eff is a crude measure of effective sample size, #> and Rhat is the potential scale reduction factor on split chains (at #> convergence, Rhat=1). @@ -396,8 +402,8 @@

Examples#> #> SAMPLING FOR MODEL 'dist_fit' NOW (CHAIN 1). #> Chain 1: -#> Chain 1: Gradient evaluation took 7.7e-05 seconds -#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.77 seconds. +#> Chain 1: Gradient evaluation took 7.5e-05 seconds +#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.75 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: @@ -444,15 +450,15 @@

Examples#> Chain 1: Iteration: 1950 / 2000 [ 97%] (Sampling) #> Chain 1: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 1: -#> Chain 1: Elapsed Time: 0.395 seconds (Warm-up) -#> Chain 1: 0.39 seconds (Sampling) -#> Chain 1: 0.785 seconds (Total) +#> Chain 1: Elapsed Time: 0.42 seconds (Warm-up) +#> Chain 1: 0.371 seconds (Sampling) +#> Chain 1: 0.791 seconds (Total) #> Chain 1: #> #> SAMPLING FOR MODEL 'dist_fit' NOW (CHAIN 2). #> Chain 2: -#> Chain 2: Gradient evaluation took 9.2e-05 seconds -#> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.92 seconds. +#> Chain 2: Gradient evaluation took 7e-05 seconds +#> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.7 seconds. #> Chain 2: Adjust your expectations accordingly! #> Chain 2: #> Chain 2: @@ -499,20 +505,20 @@

Examples#> Chain 2: Iteration: 1950 / 2000 [ 97%] (Sampling) #> Chain 2: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 2: -#> Chain 2: Elapsed Time: 0.398 seconds (Warm-up) -#> Chain 2: 0.393 seconds (Sampling) -#> Chain 2: 0.791 seconds (Total) +#> Chain 2: Elapsed Time: 0.403 seconds (Warm-up) +#> Chain 2: 0.395 seconds (Sampling) +#> Chain 2: 0.798 seconds (Total) #> Chain 2: #> Inference for Stan model: dist_fit. #> 2 chains, each with iter=2000; warmup=1000; thin=1; #> post-warmup draws per chain=1000, total post-warmup draws=2000. #> #> mean se_mean sd 2.5% 25% 50% 75% 97.5% n_eff Rhat -#> mu[1] 1.64 0.00 0.02 1.60 1.63 1.64 1.66 1.69 1483 1 -#> sigma[1] 0.19 0.00 0.02 0.16 0.18 0.19 0.20 0.23 1106 1 -#> lp__ -87.91 0.04 1.04 -90.58 -88.32 -87.59 -87.16 -86.89 843 1 +#> mu[1] 1.63 0.00 0.02 1.59 1.62 1.63 1.64 1.67 1443 1 +#> sigma[1] 0.16 0.00 0.02 0.13 0.15 0.16 0.17 0.19 1286 1 +#> lp__ -71.74 0.03 0.96 -74.22 -72.12 -71.44 -71.05 -70.80 831 1 #> -#> Samples were drawn using NUTS(diag_e) at Tue Sep 26 14:27:59 2023. +#> Samples were drawn using NUTS(diag_e) at Tue Sep 26 15:26:26 2023. #> For each parameter, n_eff is a crude measure of effective sample size, #> and Rhat is the potential scale reduction factor on split chains (at #> convergence, Rhat=1). diff --git a/reference/dist_skel.html b/reference/dist_skel.html index e8272f18f..0a0f97d59 100644 --- a/reference/dist_skel.html +++ b/reference/dist_skel.html @@ -147,7 +147,7 @@

Examples## Exponential model # sample dist_skel(10, model = "exp", params = list(rate = 1)) -#> [1] 1 1 2 1 1 0 0 0 1 0 +#> [1] 0 0 0 1 0 0 0 2 0 2 # cumulative prob density dist_skel(1:10, model = "exp", dist = TRUE, params = list(rate = 1)) @@ -165,7 +165,7 @@

Examples## Gamma model # sample dist_skel(10, model = "gamma", params = list(shape = 1, scale = 2)) -#> [1] 0 1 0 0 0 1 0 0 0 1 +#> [1] 0 0 0 0 0 0 0 0 0 0 # cumulative prob density dist_skel(0:10, @@ -187,7 +187,7 @@

Examples## Log normal model # sample dist_skel(10, model = "lognormal", params = list(mean = log(5), sd = log(2))) -#> [1] 5 7 7 4 2 5 3 6 2 5 +#> [1] 17 16 3 32 4 1 8 4 9 4 # cumulative prob density dist_skel(0:10, diff --git a/reference/epinow-1.png b/reference/epinow-1.png index e2b4bcd21..22454ab8e 100644 Binary files a/reference/epinow-1.png and b/reference/epinow-1.png differ diff --git a/reference/epinow.html b/reference/epinow.html index c4b705d35..84a3e0011 100644 --- a/reference/epinow.html +++ b/reference/epinow.html @@ -287,22 +287,22 @@

Examples delays = delay_opts(incubation_period + reporting_delay) ) #> Logging threshold set at INFO for the EpiNow2 logger -#> Writing EpiNow2 logs to the console and: /tmp/RtmpJHSvs1/regional-epinow/2020-04-01.log +#> Writing EpiNow2 logs to the console and: /tmp/RtmpH53zkW/regional-epinow/2020-04-01.log #> Logging threshold set at INFO for the EpiNow2.epinow logger -#> Writing EpiNow2.epinow logs to the console and: /tmp/RtmpJHSvs1/epinow/2020-04-01.log -#> WARN [2023-09-26 14:29:59] epinow: There were 2 divergent transitions after warmup. See +#> Writing EpiNow2.epinow logs to the console and: /tmp/RtmpH53zkW/epinow/2020-04-01.log +#> WARN [2023-09-26 15:28:19] epinow: 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. - -#> WARN [2023-09-26 14:29:59] epinow: Examine the pairs() plot to diagnose sampling problems +#> WARN [2023-09-26 15:28:19] epinow: Examine the pairs() plot to diagnose sampling problems #> - # summary of the latest estimates summary(out) -#> measure estimate -#> 1: New confirmed cases by infection date 3320 (1352 -- 7886) -#> 2: Expected change in daily cases Likely decreasing -#> 3: Effective reproduction no. 0.79 (0.5 -- 1.1) -#> 4: Rate of growth -0.05 (-0.13 -- 0.029) -#> 5: Doubling/halving time (days) -14 (24 -- -5.2) +#> measure estimate +#> 1: New confirmed cases by infection date 3255 (1288 -- 7791) +#> 2: Expected change in daily cases Likely decreasing +#> 3: Effective reproduction no. 0.77 (0.49 -- 1.1) +#> 4: Rate of growth -0.052 (-0.14 -- 0.029) +#> 5: Doubling/halving time (days) -13 (24 -- -5.1) # plot estimates plot(out) @@ -310,151 +310,151 @@

Examples# summary of R estimates summary(out, type = "parameters", params = "R") #> date variable strat type median -#> 1: 2020-02-22 R <NA> estimate 2.0646282 -#> 2: 2020-02-23 R <NA> estimate 2.0576879 -#> 3: 2020-02-24 R <NA> estimate 2.0450051 -#> 4: 2020-02-25 R <NA> estimate 2.0309301 -#> 5: 2020-02-26 R <NA> estimate 2.0100718 -#> 6: 2020-02-27 R <NA> estimate 1.9862298 -#> 7: 2020-02-28 R <NA> estimate 1.9613209 -#> 8: 2020-02-29 R <NA> estimate 1.9310483 -#> 9: 2020-03-01 R <NA> estimate 1.8999012 -#> 10: 2020-03-02 R <NA> estimate 1.8659043 -#> 11: 2020-03-03 R <NA> estimate 1.8299008 -#> 12: 2020-03-04 R <NA> estimate 1.7901626 -#> 13: 2020-03-05 R <NA> estimate 1.7490903 -#> 14: 2020-03-06 R <NA> estimate 1.7047177 -#> 15: 2020-03-07 R <NA> estimate 1.6602375 -#> 16: 2020-03-08 R <NA> estimate 1.6145739 -#> 17: 2020-03-09 R <NA> estimate 1.5673183 -#> 18: 2020-03-10 R <NA> estimate 1.5203484 -#> 19: 2020-03-11 R <NA> estimate 1.4729118 -#> 20: 2020-03-12 R <NA> estimate 1.4246144 -#> 21: 2020-03-13 R <NA> estimate 1.3776418 -#> 22: 2020-03-14 R <NA> estimate 1.3311475 -#> 23: 2020-03-15 R <NA> estimate 1.2855656 -#> 24: 2020-03-16 R <NA> estimate 1.2415248 -#> 25: 2020-03-17 R <NA> estimate 1.1979331 -#> 26: 2020-03-18 R <NA> estimate 1.1542643 -#> 27: 2020-03-19 R <NA> estimate 1.1121754 -#> 28: 2020-03-20 R <NA> estimate based on partial data 1.0732603 -#> 29: 2020-03-21 R <NA> estimate based on partial data 1.0367136 -#> 30: 2020-03-22 R <NA> estimate based on partial data 1.0029829 -#> 31: 2020-03-23 R <NA> estimate based on partial data 0.9710197 -#> 32: 2020-03-24 R <NA> estimate based on partial data 0.9411516 -#> 33: 2020-03-25 R <NA> estimate based on partial data 0.9136811 -#> 34: 2020-03-26 R <NA> estimate based on partial data 0.8902496 -#> 35: 2020-03-27 R <NA> estimate based on partial data 0.8676317 -#> 36: 2020-03-28 R <NA> estimate based on partial data 0.8477708 -#> 37: 2020-03-29 R <NA> estimate based on partial data 0.8292496 -#> 38: 2020-03-30 R <NA> estimate based on partial data 0.8136106 -#> 39: 2020-03-31 R <NA> estimate based on partial data 0.7986448 -#> 40: 2020-04-01 R <NA> estimate based on partial data 0.7862974 -#> 41: 2020-04-02 R <NA> forecast 0.7862974 -#> 42: 2020-04-03 R <NA> forecast 0.7862974 -#> 43: 2020-04-04 R <NA> forecast 0.7862974 -#> 44: 2020-04-05 R <NA> forecast 0.7862974 -#> 45: 2020-04-06 R <NA> forecast 0.7862974 -#> 46: 2020-04-07 R <NA> forecast 0.7862974 -#> 47: 2020-04-08 R <NA> forecast 0.7862974 +#> 1: 2020-02-22 R <NA> estimate 2.0670664 +#> 2: 2020-02-23 R <NA> estimate 2.0590982 +#> 3: 2020-02-24 R <NA> estimate 2.0472732 +#> 4: 2020-02-25 R <NA> estimate 2.0308789 +#> 5: 2020-02-26 R <NA> estimate 2.0116328 +#> 6: 2020-02-27 R <NA> estimate 1.9884973 +#> 7: 2020-02-28 R <NA> estimate 1.9631140 +#> 8: 2020-02-29 R <NA> estimate 1.9346137 +#> 9: 2020-03-01 R <NA> estimate 1.9022696 +#> 10: 2020-03-02 R <NA> estimate 1.8676287 +#> 11: 2020-03-03 R <NA> estimate 1.8290782 +#> 12: 2020-03-04 R <NA> estimate 1.7888863 +#> 13: 2020-03-05 R <NA> estimate 1.7470801 +#> 14: 2020-03-06 R <NA> estimate 1.7030716 +#> 15: 2020-03-07 R <NA> estimate 1.6588164 +#> 16: 2020-03-08 R <NA> estimate 1.6133604 +#> 17: 2020-03-09 R <NA> estimate 1.5652681 +#> 18: 2020-03-10 R <NA> estimate 1.5185492 +#> 19: 2020-03-11 R <NA> estimate 1.4725202 +#> 20: 2020-03-12 R <NA> estimate 1.4277817 +#> 21: 2020-03-13 R <NA> estimate 1.3813279 +#> 22: 2020-03-14 R <NA> estimate 1.3348461 +#> 23: 2020-03-15 R <NA> estimate 1.2882049 +#> 24: 2020-03-16 R <NA> estimate 1.2441210 +#> 25: 2020-03-17 R <NA> estimate 1.2003033 +#> 26: 2020-03-18 R <NA> estimate 1.1580909 +#> 27: 2020-03-19 R <NA> estimate 1.1164939 +#> 28: 2020-03-20 R <NA> estimate based on partial data 1.0763000 +#> 29: 2020-03-21 R <NA> estimate based on partial data 1.0374675 +#> 30: 2020-03-22 R <NA> estimate based on partial data 1.0015289 +#> 31: 2020-03-23 R <NA> estimate based on partial data 0.9682406 +#> 32: 2020-03-24 R <NA> estimate based on partial data 0.9380544 +#> 33: 2020-03-25 R <NA> estimate based on partial data 0.9111961 +#> 34: 2020-03-26 R <NA> estimate based on partial data 0.8845642 +#> 35: 2020-03-27 R <NA> estimate based on partial data 0.8620364 +#> 36: 2020-03-28 R <NA> estimate based on partial data 0.8393029 +#> 37: 2020-03-29 R <NA> estimate based on partial data 0.8200140 +#> 38: 2020-03-30 R <NA> estimate based on partial data 0.8030745 +#> 39: 2020-03-31 R <NA> estimate based on partial data 0.7868403 +#> 40: 2020-04-01 R <NA> estimate based on partial data 0.7749137 +#> 41: 2020-04-02 R <NA> forecast 0.7749137 +#> 42: 2020-04-03 R <NA> forecast 0.7749137 +#> 43: 2020-04-04 R <NA> forecast 0.7749137 +#> 44: 2020-04-05 R <NA> forecast 0.7749137 +#> 45: 2020-04-06 R <NA> forecast 0.7749137 +#> 46: 2020-04-07 R <NA> forecast 0.7749137 +#> 47: 2020-04-08 R <NA> forecast 0.7749137 #> date variable strat type median #> mean sd lower_90 lower_50 lower_20 upper_20 upper_50 -#> 1: 2.0649314 0.09442218 1.9094047 2.0024768 2.0411877 2.0875101 2.1238794 -#> 2: 2.0555374 0.08289223 1.9165879 2.0021024 2.0381276 2.0756978 2.1074604 -#> 3: 2.0435522 0.07669455 1.9162953 1.9931025 2.0271635 2.0632904 2.0921351 -#> 4: 2.0285730 0.07445254 1.9069565 1.9811150 2.0113893 2.0448272 2.0758207 -#> 5: 2.0102987 0.07426694 1.8867523 1.9625037 1.9929798 2.0260736 2.0555755 -#> 6: 1.9885524 0.07455339 1.8669809 1.9423226 1.9700873 2.0028229 2.0329294 -#> 7: 1.9632897 0.07439615 1.8440729 1.9163823 1.9441822 1.9769490 2.0073332 -#> 8: 1.9345934 0.07347056 1.8206256 1.8867123 1.9161894 1.9483489 1.9791074 -#> 9: 1.9026540 0.07181270 1.7932277 1.8554059 1.8834229 1.9166668 1.9475654 -#> 10: 1.8677434 0.06959916 1.7588950 1.8217109 1.8489335 1.8814683 1.9098863 -#> 11: 1.8301854 0.06700822 1.7235962 1.7867261 1.8123866 1.8447333 1.8725311 -#> 12: 1.7903291 0.06418068 1.6874971 1.7483960 1.7734480 1.8048899 1.8308138 -#> 13: 1.7485281 0.06125219 1.6512449 1.7082288 1.7335710 1.7626406 1.7879179 -#> 14: 1.7051245 0.05840339 1.6111993 1.6660477 1.6916127 1.7187833 1.7419063 -#> 15: 1.6604387 0.05587775 1.5700395 1.6222712 1.6471648 1.6729835 1.6952499 -#> 16: 1.6147635 0.05393936 1.5282538 1.5794927 1.6020451 1.6266395 1.6468407 -#> 17: 1.5683628 0.05277471 1.4823976 1.5341809 1.5545795 1.5791305 1.6002610 -#> 18: 1.5214747 0.05238742 1.4387614 1.4872074 1.5071601 1.5317255 1.5532730 -#> 19: 1.4743200 0.05256518 1.3927554 1.4403498 1.4605753 1.4854192 1.5069524 -#> 20: 1.4271125 0.05296006 1.3440970 1.3935886 1.4129709 1.4384380 1.4587293 -#> 21: 1.3800704 0.05323588 1.2952342 1.3474828 1.3659219 1.3901088 1.4127731 -#> 22: 1.3334243 0.05319596 1.2490920 1.3001461 1.3188208 1.3428356 1.3660495 -#> 23: 1.2874204 0.05283982 1.2041208 1.2532528 1.2734262 1.2983889 1.3202932 -#> 24: 1.2423179 0.05235224 1.1580364 1.2074120 1.2286555 1.2537580 1.2757810 -#> 25: 1.1983819 0.05205784 1.1150055 1.1650979 1.1851792 1.2110140 1.2315268 -#> 26: 1.1558754 0.05237173 1.0705648 1.1229922 1.1422944 1.1680191 1.1896289 -#> 27: 1.1150499 0.05375064 1.0292987 1.0802439 1.1012509 1.1263985 1.1505303 -#> 28: 1.0761379 0.05662546 0.9864128 1.0386587 1.0610662 1.0876786 1.1129226 -#> 29: 1.0393465 0.06130921 0.9415032 0.9975822 1.0232532 1.0520675 1.0794443 -#> 30: 1.0048518 0.06792200 0.8970461 0.9585826 0.9860766 1.0193793 1.0487311 -#> 31: 0.9727947 0.07638629 0.8505269 0.9216085 0.9513597 0.9904589 1.0230661 -#> 32: 0.9432791 0.08649170 0.8081680 0.8842847 0.9194856 0.9632821 0.9996716 -#> 33: 0.9163716 0.09798072 0.7618313 0.8516407 0.8901552 0.9388192 0.9803902 -#> 34: 0.8921030 0.11061562 0.7171212 0.8177591 0.8626141 0.9166419 0.9647746 -#> 35: 0.8704718 0.12422006 0.6759975 0.7863057 0.8382308 0.8959109 0.9501490 -#> 36: 0.8514481 0.13870581 0.6313181 0.7586382 0.8137468 0.8794617 0.9378580 -#> 37: 0.8349778 0.15409312 0.5960296 0.7328096 0.7926723 0.8639871 0.9271966 -#> 38: 0.8209852 0.17052431 0.5612245 0.7104975 0.7751615 0.8515596 0.9178869 -#> 39: 0.8093751 0.18826336 0.5268932 0.6872027 0.7583323 0.8406505 0.9132582 -#> 40: 0.8000317 0.20767136 0.4982755 0.6656297 0.7427598 0.8305740 0.9077300 -#> 41: 0.8000317 0.20767136 0.4982755 0.6656297 0.7427598 0.8305740 0.9077300 -#> 42: 0.8000317 0.20767136 0.4982755 0.6656297 0.7427598 0.8305740 0.9077300 -#> 43: 0.8000317 0.20767136 0.4982755 0.6656297 0.7427598 0.8305740 0.9077300 -#> 44: 0.8000317 0.20767136 0.4982755 0.6656297 0.7427598 0.8305740 0.9077300 -#> 45: 0.8000317 0.20767136 0.4982755 0.6656297 0.7427598 0.8305740 0.9077300 -#> 46: 0.8000317 0.20767136 0.4982755 0.6656297 0.7427598 0.8305740 0.9077300 -#> 47: 0.8000317 0.20767136 0.4982755 0.6656297 0.7427598 0.8305740 0.9077300 +#> 1: 2.0704319 0.09529666 1.9191538 2.0071791 2.0443684 2.0919586 2.1324213 +#> 2: 2.0616406 0.08359158 1.9296550 2.0052891 2.0386254 2.0794513 2.1167902 +#> 3: 2.0498338 0.07831101 1.9257970 1.9969741 2.0280801 2.0667809 2.1017248 +#> 4: 2.0345940 0.07711534 1.9164539 1.9825335 2.0139247 2.0488282 2.0829124 +#> 5: 2.0156520 0.07725894 1.8974929 1.9639961 1.9946501 2.0287229 2.0630723 +#> 6: 1.9929096 0.07695573 1.8745432 1.9426699 1.9715624 2.0076427 2.0400073 +#> 7: 1.9664379 0.07561435 1.8495164 1.9175014 1.9453571 1.9801314 2.0100573 +#> 8: 1.9364532 0.07342792 1.8199361 1.8897065 1.9171856 1.9511999 1.9796034 +#> 9: 1.9032775 0.07087220 1.7886202 1.8583035 1.8861337 1.9188049 1.9465331 +#> 10: 1.8672943 0.06834903 1.7575587 1.8231526 1.8512719 1.8823402 1.9101342 +#> 11: 1.8289095 0.06603745 1.7236894 1.7871859 1.8144879 1.8437863 1.8717591 +#> 12: 1.7885217 0.06392030 1.6861178 1.7472128 1.7741947 1.8036704 1.8292789 +#> 13: 1.7465026 0.06190395 1.6463599 1.7077241 1.7319641 1.7617834 1.7861239 +#> 14: 1.7031852 0.05994218 1.6053957 1.6650124 1.6892706 1.7177952 1.7411981 +#> 15: 1.6588569 0.05810291 1.5633141 1.6221461 1.6449172 1.6724638 1.6957828 +#> 16: 1.6137587 0.05655025 1.5238404 1.5770304 1.5981674 1.6266882 1.6493781 +#> 17: 1.5680875 0.05544974 1.4810285 1.5324999 1.5519840 1.5798133 1.6019955 +#> 18: 1.5220057 0.05485378 1.4370186 1.4853957 1.5053486 1.5329832 1.5555668 +#> 19: 1.4756547 0.05465840 1.3896951 1.4391094 1.4586262 1.4866156 1.5097008 +#> 20: 1.4291732 0.05466610 1.3435796 1.3927741 1.4132854 1.4405560 1.4625497 +#> 21: 1.3827138 0.05467986 1.2971464 1.3463384 1.3681523 1.3947700 1.4156164 +#> 22: 1.3364539 0.05454446 1.2507237 1.3005220 1.3223640 1.3479110 1.3693740 +#> 23: 1.2906010 0.05415545 1.2051575 1.2553584 1.2777410 1.3013471 1.3235004 +#> 24: 1.2453919 0.05350467 1.1598538 1.2110986 1.2326015 1.2560433 1.2772358 +#> 25: 1.2010890 0.05276736 1.1148850 1.1674781 1.1891151 1.2120901 1.2316178 +#> 26: 1.1579728 0.05236879 1.0735252 1.1239177 1.1466305 1.1703584 1.1891766 +#> 27: 1.1163320 0.05295864 1.0317837 1.0806751 1.1041334 1.1289041 1.1508941 +#> 28: 1.0764506 0.05524766 0.9875496 1.0397383 1.0635122 1.0875810 1.1129851 +#> 29: 1.0385939 0.05974681 0.9426785 0.9990324 1.0238236 1.0513168 1.0775245 +#> 30: 1.0029941 0.06658030 0.8967779 0.9603443 0.9875928 1.0177106 1.0457635 +#> 31: 0.9698407 0.07551893 0.8466634 0.9223758 0.9517412 0.9866051 1.0164960 +#> 32: 0.9392746 0.08617097 0.8002562 0.8849067 0.9198023 0.9596714 0.9920944 +#> 33: 0.9113897 0.09816902 0.7480099 0.8484448 0.8888011 0.9333724 0.9716080 +#> 34: 0.8862380 0.11125911 0.7025717 0.8155085 0.8603593 0.9096474 0.9552082 +#> 35: 0.8638340 0.12528309 0.6603036 0.7841749 0.8332404 0.8885213 0.9398549 +#> 36: 0.8441553 0.14011375 0.6195830 0.7557159 0.8095716 0.8715243 0.9276480 +#> 37: 0.8271398 0.15562288 0.5858491 0.7292621 0.7867773 0.8556073 0.9171156 +#> 38: 0.8126850 0.17170114 0.5514701 0.7058500 0.7662263 0.8416938 0.9109486 +#> 39: 0.8006517 0.18828283 0.5192436 0.6844343 0.7466339 0.8308951 0.9082947 +#> 40: 0.7908705 0.20533493 0.4913584 0.6654767 0.7297090 0.8205895 0.9043175 +#> 41: 0.7908705 0.20533493 0.4913584 0.6654767 0.7297090 0.8205895 0.9043175 +#> 42: 0.7908705 0.20533493 0.4913584 0.6654767 0.7297090 0.8205895 0.9043175 +#> 43: 0.7908705 0.20533493 0.4913584 0.6654767 0.7297090 0.8205895 0.9043175 +#> 44: 0.7908705 0.20533493 0.4913584 0.6654767 0.7297090 0.8205895 0.9043175 +#> 45: 0.7908705 0.20533493 0.4913584 0.6654767 0.7297090 0.8205895 0.9043175 +#> 46: 0.7908705 0.20533493 0.4913584 0.6654767 0.7297090 0.8205895 0.9043175 +#> 47: 0.7908705 0.20533493 0.4913584 0.6654767 0.7297090 0.8205895 0.9043175 #> mean sd lower_90 lower_50 lower_20 upper_20 upper_50 #> upper_90 -#> 1: 2.227626 -#> 2: 2.191834 -#> 3: 2.167853 -#> 4: 2.151306 -#> 5: 2.131355 -#> 6: 2.114358 -#> 7: 2.088618 -#> 8: 2.061302 -#> 9: 2.023578 -#> 10: 1.983110 -#> 11: 1.939300 -#> 12: 1.895713 -#> 13: 1.848404 -#> 14: 1.801413 -#> 15: 1.753215 -#> 16: 1.705404 -#> 17: 1.658682 -#> 18: 1.610396 -#> 19: 1.563941 -#> 20: 1.519104 -#> 21: 1.472302 -#> 22: 1.425749 -#> 23: 1.377859 -#> 24: 1.330748 -#> 25: 1.284171 -#> 26: 1.239392 -#> 27: 1.201641 -#> 28: 1.171109 -#> 29: 1.143003 -#> 30: 1.119307 -#> 31: 1.100246 -#> 32: 1.086192 -#> 33: 1.076207 -#> 34: 1.073999 -#> 35: 1.075719 -#> 36: 1.081628 -#> 37: 1.093658 -#> 38: 1.104207 -#> 39: 1.119417 -#> 40: 1.142197 -#> 41: 1.142197 -#> 42: 1.142197 -#> 43: 1.142197 -#> 44: 1.142197 -#> 45: 1.142197 -#> 46: 1.142197 -#> 47: 1.142197 +#> 1: 2.230092 +#> 2: 2.203211 +#> 3: 2.181303 +#> 4: 2.162813 +#> 5: 2.143163 +#> 6: 2.123807 +#> 7: 2.096559 +#> 8: 2.062018 +#> 9: 2.025379 +#> 10: 1.983603 +#> 11: 1.941581 +#> 12: 1.893666 +#> 13: 1.847878 +#> 14: 1.799219 +#> 15: 1.751770 +#> 16: 1.705234 +#> 17: 1.659713 +#> 18: 1.615090 +#> 19: 1.572246 +#> 20: 1.522334 +#> 21: 1.476374 +#> 22: 1.429048 +#> 23: 1.380608 +#> 24: 1.334970 +#> 25: 1.291106 +#> 26: 1.246314 +#> 27: 1.204886 +#> 28: 1.169976 +#> 29: 1.136885 +#> 30: 1.113280 +#> 31: 1.094239 +#> 32: 1.080519 +#> 33: 1.068440 +#> 34: 1.064158 +#> 35: 1.065692 +#> 36: 1.073463 +#> 37: 1.085823 +#> 38: 1.096002 +#> 39: 1.116439 +#> 40: 1.138535 +#> 41: 1.138535 +#> 42: 1.138535 +#> 43: 1.138535 +#> 44: 1.138535 +#> 45: 1.138535 +#> 46: 1.138535 +#> 47: 1.138535 #> upper_90 options(old_opts) diff --git a/reference/estimate_delay.html b/reference/estimate_delay.html index 2f5ee473f..6f769c276 100644 --- a/reference/estimate_delay.html +++ b/reference/estimate_delay.html @@ -116,7 +116,7 @@

Examples#> Warning: `samples` must be at least 1000. Now setting it to 1000 internally. #> Warning: `samples` must be at least 1000. Now setting it to 1000 internally. #> -#> Uncertain lognormal distribution with (untruncated) logmean 1.4 (SD 0.12) and logSD 1.2 (SD 0.088) +#> Uncertain lognormal distribution with (untruncated) logmean 1.4 (SD 0.1) and logSD 1.2 (SD 0.082) #> # } diff --git a/reference/estimate_infections-1.png b/reference/estimate_infections-1.png index 41a83a7d7..c9337b90a 100644 Binary files a/reference/estimate_infections-1.png and b/reference/estimate_infections-1.png differ diff --git a/reference/estimate_infections-10.png b/reference/estimate_infections-10.png index 2f95b65ba..dd81eb227 100644 Binary files a/reference/estimate_infections-10.png and b/reference/estimate_infections-10.png differ diff --git a/reference/estimate_infections-11.png b/reference/estimate_infections-11.png index f4699bb7a..604c0b2b7 100644 Binary files a/reference/estimate_infections-11.png and b/reference/estimate_infections-11.png differ diff --git a/reference/estimate_infections-12.png b/reference/estimate_infections-12.png index 7ad6ab05d..aed4f34e7 100644 Binary files a/reference/estimate_infections-12.png and b/reference/estimate_infections-12.png differ diff --git a/reference/estimate_infections-2.png b/reference/estimate_infections-2.png index abb2c2c11..fced9737d 100644 Binary files a/reference/estimate_infections-2.png and b/reference/estimate_infections-2.png differ diff --git a/reference/estimate_infections-3.png b/reference/estimate_infections-3.png index 353fd61ed..b7287d5e3 100644 Binary files a/reference/estimate_infections-3.png and b/reference/estimate_infections-3.png differ diff --git a/reference/estimate_infections-4.png b/reference/estimate_infections-4.png index 9ea30fb24..67427ecde 100644 Binary files a/reference/estimate_infections-4.png and b/reference/estimate_infections-4.png differ diff --git a/reference/estimate_infections-5.png b/reference/estimate_infections-5.png index 8b84c7d29..210390d49 100644 Binary files a/reference/estimate_infections-5.png and b/reference/estimate_infections-5.png differ diff --git a/reference/estimate_infections-6.png b/reference/estimate_infections-6.png index 5fd29fe1f..8d572b761 100644 Binary files a/reference/estimate_infections-6.png and b/reference/estimate_infections-6.png differ diff --git a/reference/estimate_infections-7.png b/reference/estimate_infections-7.png index b25fb350e..8723b8051 100644 Binary files a/reference/estimate_infections-7.png and b/reference/estimate_infections-7.png differ diff --git a/reference/estimate_infections-8.png b/reference/estimate_infections-8.png index c5b5baca5..4fc2f4dd7 100644 Binary files a/reference/estimate_infections-8.png and b/reference/estimate_infections-8.png differ diff --git a/reference/estimate_infections-9.png b/reference/estimate_infections-9.png index ae3dccf95..50fb5ef87 100644 Binary files a/reference/estimate_infections-9.png and b/reference/estimate_infections-9.png differ diff --git a/reference/estimate_infections.html b/reference/estimate_infections.html index b636523dc..953d51148 100644 --- a/reference/estimate_infections.html +++ b/reference/estimate_infections.html @@ -277,18 +277,18 @@

Examples rt = rt_opts(prior = list(mean = 2, sd = 0.1)), stan = stan_opts(control = list(adapt_delta = 0.95)) ) -#> Warning: There were 2 divergent transitions after warmup. See +#> Warning: There were 3 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 # real time estimates summary(def) #> measure estimate -#> 1: New confirmed cases by infection date 2259 (1128 -- 4406) +#> 1: New confirmed cases by infection date 2285 (1101 -- 4432) #> 2: Expected change in daily cases Likely decreasing -#> 3: Effective reproduction no. 0.88 (0.62 -- 1.2) -#> 4: Rate of growth -0.027 (-0.095 -- 0.037) -#> 5: Doubling/halving time (days) -26 (19 -- -7.3) +#> 3: Effective reproduction no. 0.88 (0.61 -- 1.2) +#> 4: Rate of growth -0.026 (-0.098 -- 0.038) +#> 5: Doubling/halving time (days) -26 (18 -- -7.1) # summary plot plot(def) @@ -303,17 +303,17 @@

Examples gp = gp_opts(ls_min = 10, basis_prop = 0.1), stan = stan_opts(control = list(adapt_delta = 0.95)) ) -#> Warning: There were 8 divergent transitions after warmup. See +#> Warning: 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. #> Warning: Examine the pairs() plot to diagnose sampling problems summary(agp) -#> measure estimate -#> 1: New confirmed cases by infection date 2353 (1253 -- 4443) -#> 2: Expected change in daily cases Likely decreasing -#> 3: Effective reproduction no. 0.9 (0.65 -- 1.2) -#> 4: Rate of growth -0.023 (-0.085 -- 0.04) -#> 5: Doubling/halving time (days) -30 (17 -- -8.1) +#> measure estimate +#> 1: New confirmed cases by infection date 2377 (1227 -- 4458) +#> 2: Expected change in daily cases Likely decreasing +#> 3: Effective reproduction no. 0.89 (0.64 -- 1.2) +#> 4: Rate of growth -0.024 (-0.089 -- 0.039) +#> 5: Doubling/halving time (days) -29 (18 -- -7.8) plot(agp) @@ -328,7 +328,7 @@

Examples gp = gp_opts(ls_min = 10, basis_prop = 0.1), horizon = 21, stan = stan_opts(control = list(adapt_delta = 0.95)) ) -#> Warning: There were 3 divergent transitions after warmup. See +#> Warning: There were 4 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 @@ -350,7 +350,7 @@

Examples gp = gp_opts(ls_min = 10, basis_prop = 0.1), stan = stan_opts(control = list(adapt_delta = 0.95)) ) -#> Warning: There were 8 divergent transitions after warmup. See +#> Warning: 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. #> Warning: Examine the pairs() plot to diagnose sampling problems @@ -385,7 +385,7 @@

Examples future = "project" ) ) -#> Warning: There were 5 divergent transitions after warmup. See +#> Warning: There were 8 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 @@ -399,7 +399,7 @@

Examples delays = delay_opts(incubation_period + reporting_delay), rt = rt_opts(prior = list(mean = 1, sd = 0.1)) ) -#> Warning: There were 25 divergent transitions after warmup. See +#> Warning: There were 17 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 @@ -431,10 +431,16 @@

Examples reported_cases, generation_time = generation_time_opts(generation_time) ) -#> Warning: There were 1 divergent transitions after warmup. See +#> Warning: There were 33 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 +#> Warning: 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 +#> Warning: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable. +#> Running the chains for more iterations may help. See +#> https://mc-stan.org/misc/warnings.html#tail-ess plot(no_delay) @@ -452,10 +458,10 @@

Examples) # break point effect summary(bkp, type = "parameters", params = "breakpoints") -#> date variable strat type median mean sd lower_90 -#> 1: <NA> breakpoints 1 <NA> -0.6713189 -0.6710443 0.02907782 -0.720559 -#> lower_50 lower_20 upper_20 upper_50 upper_90 -#> 1: -0.6902086 -0.6782992 -0.6633472 -0.6507014 -0.624803 +#> date variable strat type median mean sd lower_90 +#> 1: <NA> breakpoints 1 <NA> -0.6727372 -0.6727021 0.02994277 -0.7205137 +#> lower_50 lower_20 upper_20 upper_50 upper_90 +#> 1: -0.6935414 -0.6800491 -0.6646493 -0.6517078 -0.6251641 plot(bkp) @@ -471,23 +477,23 @@

Examples# random walk effects summary(rw, type = "parameters", params = "breakpoints") #> date variable strat type median mean sd lower_90 -#> 1: <NA> breakpoints 1 <NA> -0.13964585 -0.13905068 0.07150946 -0.2602860 -#> 2: <NA> breakpoints 2 <NA> -0.15763441 -0.15799366 0.08801478 -0.3021297 -#> 3: <NA> breakpoints 3 <NA> -0.22502642 -0.22556358 0.09514631 -0.3796809 -#> 4: <NA> breakpoints 4 <NA> -0.27183603 -0.27459143 0.09809851 -0.4365133 -#> 5: <NA> breakpoints 5 <NA> -0.06512446 -0.06624805 0.09775023 -0.2231481 -#> 6: <NA> breakpoints 6 <NA> 0.03712954 0.03829067 0.10221759 -0.1263556 -#> 7: <NA> breakpoints 7 <NA> -0.05329042 -0.05416274 0.11396333 -0.2402483 -#> 8: <NA> breakpoints 8 <NA> -0.01885540 -0.02226942 0.17202890 -0.3058259 +#> 1: <NA> breakpoints 1 <NA> -0.13434895 -0.13445464 0.07143227 -0.2510856 +#> 2: <NA> breakpoints 2 <NA> -0.16754973 -0.16901524 0.08428734 -0.3099213 +#> 3: <NA> breakpoints 3 <NA> -0.21291696 -0.21385606 0.08962088 -0.3577062 +#> 4: <NA> breakpoints 4 <NA> -0.28130710 -0.28116723 0.09848509 -0.4444970 +#> 5: <NA> breakpoints 5 <NA> -0.06520991 -0.06574470 0.09953010 -0.2347778 +#> 6: <NA> breakpoints 6 <NA> 0.03790157 0.04066258 0.10240392 -0.1187247 +#> 7: <NA> breakpoints 7 <NA> -0.05340166 -0.05351565 0.11713635 -0.2535568 +#> 8: <NA> breakpoints 8 <NA> -0.02005072 -0.01872663 0.17220665 -0.2871967 #> lower_50 lower_20 upper_20 upper_50 upper_90 -#> 1: -0.18467810 -0.15698694 -0.11895254 -0.092221057 -0.02076548 -#> 2: -0.21517028 -0.17773485 -0.13689702 -0.102388128 -0.01173660 -#> 3: -0.29058037 -0.24881074 -0.19873327 -0.162177940 -0.06924341 -#> 4: -0.33876909 -0.29604769 -0.24903431 -0.207757622 -0.12062968 -#> 5: -0.13194601 -0.09251261 -0.04114243 -0.002502974 0.09800112 -#> 6: -0.02938721 0.01243776 0.06226949 0.105961324 0.21085055 -#> 7: -0.13080209 -0.07917545 -0.02354062 0.020120765 0.13217685 -#> 8: -0.12447324 -0.06107759 0.01677063 0.087493247 0.26026591 +#> 1: -0.18405093 -0.15404417 -0.11712145 -0.084924048 -0.01575826 +#> 2: -0.22323940 -0.18867072 -0.14860125 -0.114002708 -0.03101021 +#> 3: -0.27313376 -0.23832056 -0.19327687 -0.156736751 -0.06269791 +#> 4: -0.34324107 -0.30384546 -0.25414151 -0.213123551 -0.12764622 +#> 5: -0.13321403 -0.08987899 -0.03826645 0.001080482 0.09518668 +#> 6: -0.02739738 0.01071721 0.06522339 0.106367566 0.21324583 +#> 7: -0.12597604 -0.08105306 -0.02189179 0.023872316 0.13462128 +#> 8: -0.12876121 -0.06215569 0.02284186 0.091843829 0.26416713 plot(rw) diff --git a/reference/estimate_secondary-1.png b/reference/estimate_secondary-1.png index 50abc52aa..bfd0408d3 100644 Binary files a/reference/estimate_secondary-1.png and b/reference/estimate_secondary-1.png differ diff --git a/reference/estimate_secondary-2.png b/reference/estimate_secondary-2.png index 343bcf8cb..e498b5b05 100644 Binary files a/reference/estimate_secondary-2.png and b/reference/estimate_secondary-2.png differ diff --git a/reference/estimate_secondary-3.png b/reference/estimate_secondary-3.png index dc53bba7b..0f0102492 100644 Binary files a/reference/estimate_secondary-3.png and b/reference/estimate_secondary-3.png differ diff --git a/reference/estimate_secondary-4.png b/reference/estimate_secondary-4.png index 4f9b1b336..deda7ebc5 100644 Binary files a/reference/estimate_secondary-4.png and b/reference/estimate_secondary-4.png differ diff --git a/reference/estimate_secondary.html b/reference/estimate_secondary.html index b2978ed96..307cdf55b 100644 --- a/reference/estimate_secondary.html +++ b/reference/estimate_secondary.html @@ -314,10 +314,6 @@

Examples scale = list(mean = 0.4, sd = 0.1) ) ) -#> Warning: There were 3 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 plot(prev, primary = TRUE) diff --git a/reference/get_regional_results.html b/reference/get_regional_results.html index b23122277..cd820f5ba 100644 --- a/reference/get_regional_results.html +++ b/reference/get_regional_results.html @@ -160,21 +160,21 @@

Examples target_folder = dir, return_output = TRUE ) -#> INFO [2023-09-26 14:55:53] Producing following optional outputs: regions, latest +#> INFO [2023-09-26 15:54:35] Producing following optional outputs: regions, latest #> Logging threshold set at INFO for the EpiNow2 logger -#> Writing EpiNow2 logs to the console and: /tmp/RtmpJHSvs1/regional-epinow/2020-03-22.log +#> Writing EpiNow2 logs to the console and: /tmp/RtmpH53zkW/regional-epinow/2020-03-22.log #> Logging threshold set at INFO for the EpiNow2.epinow logger -#> Writing EpiNow2.epinow logs to: /tmp/RtmpJHSvs1/epinow/2020-03-22.log -#> INFO [2023-09-26 14:55:53] Reporting estimates using data up to: 2020-03-22 -#> INFO [2023-09-26 14:55:53] Saving estimates to : /tmp/RtmpJHSvs1/results -#> INFO [2023-09-26 14:55:53] Producing estimates for: testland, realland -#> INFO [2023-09-26 14:55:53] Regions excluded: none -#> INFO [2023-09-26 14:56:22] Completed estimates for: testland -#> INFO [2023-09-26 14:56:47] Completed estimates for: realland -#> INFO [2023-09-26 14:56:47] Completed regional estimates -#> INFO [2023-09-26 14:56:47] Regions with estimates: 2 -#> INFO [2023-09-26 14:56:47] Regions with runtime errors: 0 -#> INFO [2023-09-26 14:56:47] Saving timings information to : /tmp/RtmpJHSvs1/results +#> Writing EpiNow2.epinow logs to: /tmp/RtmpH53zkW/epinow/2020-03-22.log +#> INFO [2023-09-26 15:54:35] Reporting estimates using data up to: 2020-03-22 +#> INFO [2023-09-26 15:54:35] Saving estimates to : /tmp/RtmpH53zkW/results +#> INFO [2023-09-26 15:54:35] Producing estimates for: testland, realland +#> INFO [2023-09-26 15:54:35] Regions excluded: none +#> INFO [2023-09-26 15:55:05] Completed estimates for: testland +#> INFO [2023-09-26 15:55:30] Completed estimates for: realland +#> INFO [2023-09-26 15:55:30] Completed regional estimates +#> INFO [2023-09-26 15:55:30] Regions with estimates: 2 +#> INFO [2023-09-26 15:55:30] Regions with runtime errors: 0 +#> INFO [2023-09-26 15:55:30] Saving timings information to : /tmp/RtmpH53zkW/results # from output results <- get_regional_results(regional_out$regional, samples = FALSE) names(results) diff --git a/reference/gp_opts.html b/reference/gp_opts.html index a01ecebbb..18ad7a902 100644 --- a/reference/gp_opts.html +++ b/reference/gp_opts.html @@ -126,7 +126,7 @@

ArgumentsExamples ), verbose = interactive() ) -#> INFO [2023-09-26 14:59:16] Producing following optional outputs: regions, summary, samples, plots, latest +#> INFO [2023-09-26 15:58:00] 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: /tmp/RtmpJHSvs1/regional-epinow/2020-04-21.log +#> Writing EpiNow2 logs to the console and: /tmp/RtmpH53zkW/regional-epinow/2020-04-21.log #> Logging threshold set at INFO for the EpiNow2.epinow logger -#> Writing EpiNow2.epinow logs to: /tmp/RtmpJHSvs1/epinow/2020-04-21.log -#> INFO [2023-09-26 14:59:16] Reporting estimates using data up to: 2020-04-21 -#> INFO [2023-09-26 14:59:16] No target directory specified so returning output -#> INFO [2023-09-26 14:59:16] Producing estimates for: testland, realland -#> INFO [2023-09-26 14:59:16] Regions excluded: none -#> INFO [2023-09-26 15:02:05] Completed estimates for: testland -#> INFO [2023-09-26 15:04:32] Completed estimates for: realland -#> INFO [2023-09-26 15:04:32] Completed regional estimates -#> INFO [2023-09-26 15:04:32] Regions with estimates: 2 -#> INFO [2023-09-26 15:04:32] Regions with runtime errors: 0 -#> INFO [2023-09-26 15:04:32] Producing summary -#> INFO [2023-09-26 15:04:32] No summary directory specified so returning summary output -#> INFO [2023-09-26 15:04:33] No target directory specified so returning timings +#> Writing EpiNow2.epinow logs to: /tmp/RtmpH53zkW/epinow/2020-04-21.log +#> INFO [2023-09-26 15:58:00] Reporting estimates using data up to: 2020-04-21 +#> INFO [2023-09-26 15:58:00] No target directory specified so returning output +#> INFO [2023-09-26 15:58:00] Producing estimates for: testland, realland +#> INFO [2023-09-26 15:58:00] Regions excluded: none +#> INFO [2023-09-26 16:00:48] Completed estimates for: testland +#> INFO [2023-09-26 16:03:16] Completed estimates for: realland +#> INFO [2023-09-26 16:03:16] Completed regional estimates +#> INFO [2023-09-26 16:03:16] Regions with estimates: 2 +#> INFO [2023-09-26 16:03:16] Regions with runtime errors: 0 +#> INFO [2023-09-26 16:03:16] Producing summary +#> INFO [2023-09-26 16:03:16] No summary directory specified so returning summary output +#> INFO [2023-09-26 16:03:16] No target directory specified so returning timings # apply a different rt method per region # (here a gaussian process and a weekly random walk) @@ -343,23 +343,23 @@

Examples ), verbose = interactive() ) -#> INFO [2023-09-26 15:04:33] Producing following optional outputs: regions, summary, samples, plots, latest +#> INFO [2023-09-26 16:03:16] 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: /tmp/RtmpJHSvs1/regional-epinow/2020-04-21.log +#> Writing EpiNow2 logs to the console and: /tmp/RtmpH53zkW/regional-epinow/2020-04-21.log #> Logging threshold set at INFO for the EpiNow2.epinow logger -#> Writing EpiNow2.epinow logs to: /tmp/RtmpJHSvs1/epinow/2020-04-21.log -#> INFO [2023-09-26 15:04:33] Reporting estimates using data up to: 2020-04-21 -#> INFO [2023-09-26 15:04:33] No target directory specified so returning output -#> INFO [2023-09-26 15:04:33] Producing estimates for: testland, realland -#> INFO [2023-09-26 15:04:33] Regions excluded: none -#> INFO [2023-09-26 15:07:16] Completed estimates for: testland -#> INFO [2023-09-26 15:07:52] Completed estimates for: realland -#> INFO [2023-09-26 15:07:52] Completed regional estimates -#> INFO [2023-09-26 15:07:52] Regions with estimates: 2 -#> INFO [2023-09-26 15:07:52] Regions with runtime errors: 0 -#> INFO [2023-09-26 15:07:52] Producing summary -#> INFO [2023-09-26 15:07:52] No summary directory specified so returning summary output -#> INFO [2023-09-26 15:07:53] No target directory specified so returning timings +#> Writing EpiNow2.epinow logs to: /tmp/RtmpH53zkW/epinow/2020-04-21.log +#> INFO [2023-09-26 16:03:16] Reporting estimates using data up to: 2020-04-21 +#> INFO [2023-09-26 16:03:16] No target directory specified so returning output +#> INFO [2023-09-26 16:03:16] Producing estimates for: testland, realland +#> INFO [2023-09-26 16:03:16] Regions excluded: none +#> INFO [2023-09-26 16:05:58] Completed estimates for: testland +#> INFO [2023-09-26 16:06:35] Completed estimates for: realland +#> INFO [2023-09-26 16:06:35] Completed regional estimates +#> INFO [2023-09-26 16:06:35] Regions with estimates: 2 +#> INFO [2023-09-26 16:06:35] Regions with runtime errors: 0 +#> INFO [2023-09-26 16:06:35] Producing summary +#> INFO [2023-09-26 16:06:35] No summary directory specified so returning summary output +#> INFO [2023-09-26 16:06:35] No target directory specified so returning timings options(old_opts) # } diff --git a/reference/regional_runtimes.html b/reference/regional_runtimes.html index 2e9db121c..89996a99a 100644 --- a/reference/regional_runtimes.html +++ b/reference/regional_runtimes.html @@ -147,26 +147,26 @@

Examples stan = stan_opts(samples = 100, warmup = 100), output = c("region", "timing") ) -#> INFO [2023-09-26 15:08:08] Producing following optional outputs: regions, timing +#> INFO [2023-09-26 16:06:51] Producing following optional outputs: regions, timing #> Logging threshold set at INFO for the EpiNow2 logger -#> Writing EpiNow2 logs to the console and: /tmp/RtmpJHSvs1/regional-epinow/2020-03-22.log +#> Writing EpiNow2 logs to the console and: /tmp/RtmpH53zkW/regional-epinow/2020-03-22.log #> Logging threshold set at INFO for the EpiNow2.epinow logger -#> Writing EpiNow2.epinow logs to: /tmp/RtmpJHSvs1/epinow/2020-03-22.log -#> INFO [2023-09-26 15:08:08] Reporting estimates using data up to: 2020-03-22 -#> INFO [2023-09-26 15:08:08] No target directory specified so returning output -#> INFO [2023-09-26 15:08:08] Producing estimates for: testland, realland -#> INFO [2023-09-26 15:08:08] Regions excluded: none -#> INFO [2023-09-26 15:08:39] Completed estimates for: testland -#> INFO [2023-09-26 15:09:13] Completed estimates for: realland -#> INFO [2023-09-26 15:09:13] Completed regional estimates -#> INFO [2023-09-26 15:09:13] Regions with estimates: 2 -#> INFO [2023-09-26 15:09:13] Regions with runtime errors: 0 -#> INFO [2023-09-26 15:09:13] No target directory specified so returning timings +#> Writing EpiNow2.epinow logs to: /tmp/RtmpH53zkW/epinow/2020-03-22.log +#> INFO [2023-09-26 16:06:51] Reporting estimates using data up to: 2020-03-22 +#> INFO [2023-09-26 16:06:51] No target directory specified so returning output +#> INFO [2023-09-26 16:06:51] Producing estimates for: testland, realland +#> INFO [2023-09-26 16:06:51] Regions excluded: none +#> INFO [2023-09-26 16:07:21] Completed estimates for: testland +#> INFO [2023-09-26 16:07:56] Completed estimates for: realland +#> INFO [2023-09-26 16:07:56] Completed regional estimates +#> INFO [2023-09-26 16:07:56] Regions with estimates: 2 +#> INFO [2023-09-26 16:07:56] Regions with runtime errors: 0 +#> INFO [2023-09-26 16:07:56] No target directory specified so returning timings regional_runtimes(regional_output = regional_out$regional) -#> INFO [2023-09-26 15:09:13] No target directory specified so returning timings +#> INFO [2023-09-26 16:07:56] No target directory specified so returning timings #> region time -#> 1: testland 30.5 +#> 1: testland 30.7 #> 2: realland 34.5 # } diff --git a/reference/regional_summary.html b/reference/regional_summary.html index bac7f1b52..db1a42d1c 100644 --- a/reference/regional_summary.html +++ b/reference/regional_summary.html @@ -193,27 +193,27 @@

Examples output = "region", rt = NULL ) -#> INFO [2023-09-26 15:09:28] Producing following optional outputs: regions +#> INFO [2023-09-26 16:08:11] Producing following optional outputs: regions #> Logging threshold set at INFO for the EpiNow2 logger -#> Writing EpiNow2 logs to the console and: /tmp/RtmpJHSvs1/regional-epinow/2020-03-22.log +#> Writing EpiNow2 logs to the console and: /tmp/RtmpH53zkW/regional-epinow/2020-03-22.log #> Logging threshold set at INFO for the EpiNow2.epinow logger -#> Writing EpiNow2.epinow logs to: /tmp/RtmpJHSvs1/epinow/2020-03-22.log -#> INFO [2023-09-26 15:09:28] Reporting estimates using data up to: 2020-03-22 -#> INFO [2023-09-26 15:09:28] No target directory specified so returning output -#> INFO [2023-09-26 15:09:28] Producing estimates for: testland, realland -#> INFO [2023-09-26 15:09:28] Regions excluded: none -#> INFO [2023-09-26 15:09:43] Completed estimates for: testland -#> INFO [2023-09-26 15:09:59] Completed estimates for: realland -#> INFO [2023-09-26 15:09:59] Completed regional estimates -#> INFO [2023-09-26 15:09:59] Regions with estimates: 2 -#> INFO [2023-09-26 15:09:59] Regions with runtime errors: 0 -#> INFO [2023-09-26 15:09:59] No target directory specified so returning timings +#> Writing EpiNow2.epinow logs to: /tmp/RtmpH53zkW/epinow/2020-03-22.log +#> INFO [2023-09-26 16:08:11] Reporting estimates using data up to: 2020-03-22 +#> INFO [2023-09-26 16:08:11] No target directory specified so returning output +#> INFO [2023-09-26 16:08:11] Producing estimates for: testland, realland +#> INFO [2023-09-26 16:08:11] Regions excluded: none +#> INFO [2023-09-26 16:08:25] Completed estimates for: testland +#> INFO [2023-09-26 16:08:41] Completed estimates for: realland +#> INFO [2023-09-26 16:08:41] Completed regional estimates +#> INFO [2023-09-26 16:08:41] Regions with estimates: 2 +#> INFO [2023-09-26 16:08:41] Regions with runtime errors: 0 +#> INFO [2023-09-26 16:08:41] No target directory specified so returning timings regional_summary( regional_output = out$regional, reported_cases = cases ) -#> INFO [2023-09-26 15:09:59] No summary directory specified so returning summary output +#> INFO [2023-09-26 16:08:41] No summary directory specified so returning summary output #> $latest_date #> [1] "2020-03-22" #> diff --git a/reference/setup_default_logging.html b/reference/setup_default_logging.html index 6e5cea180..a576f92fd 100644 --- a/reference/setup_default_logging.html +++ b/reference/setup_default_logging.html @@ -110,9 +110,9 @@

Value

Examples

setup_default_logging()
 #> Logging threshold set at INFO for the EpiNow2 logger
-#> Writing EpiNow2 logs to the console and: /tmp/RtmpJHSvs1/regional-epinow/latest.log
+#> Writing EpiNow2 logs to the console and: /tmp/RtmpH53zkW/regional-epinow/latest.log
 #> Logging threshold set at INFO for the EpiNow2.epinow logger
-#> Writing EpiNow2.epinow logs to: /tmp/RtmpJHSvs1/epinow/latest.log
+#> Writing EpiNow2.epinow logs to: /tmp/RtmpH53zkW/epinow/latest.log