-
Notifications
You must be signed in to change notification settings - Fork 33
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
non-continuity between the estimated and forecast growth rate credible intervals #710
Comments
I can see a bug here but first are you looking at fits with the same seed in both R and stan? |
I think this might be an effect of the changed growth rate calculation in #610 The new version is the better version I think but it does mean that the non-smooth change in R translates into a discontinuity in growth (not 100% sure though - might be worth testing in simulation). @avallecam can you check what it looks like when using |
This is what we're seeing I think: library("ggplot2")
library("dplyr")
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union library("tidyr")
source("https://raw.githubusercontent.com/nfidd/nfidd/main/functions/renewal.r")
source("https://raw.githubusercontent.com/nfidd/nfidd/main/functions/censored-delay-pmf.r")
gen_pmf <- censored_delay_pmf(rgen = rgamma, max = 14, shape = 5, rate = 1)
R <- c(rep(1, 20), 1 + seq(0, 1, by = 0.05)**2, rep(2, 20))
I <- renewal(I0 = 1, R = R, gen_time = gen_pmf)
logI <- log(I)
## discard initial bit
growth <- c(NA_real_, diff(logI))
df <- tibble(t = seq_along(I), logI = logI, I = I, R = R, growth = growth) |>
filter(t > 20) |> ## discard initial bit
pivot_longer(c(logI, I, R, growth))
ggplot(df, aes(x = t, y = value)) +
geom_line() +
facet_wrap( ~ name, scales = "free_y", ncol = 1) Created on 2024-07-02 with reprex v2.1.0 |
|
The more concerning issue is that in the original question, the plot on the right has an axis up to 0.4 whilst on the left its 0.2 but looks visually the same in sample. |
After updating to the new dist-interface, we made one misspecification as shown in this checklist box for the |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Summary:
CRAN version 1.4.0 and CRAN version 1.5.2 generate different figures from growth rate estimates.
Description:
This is currently visible in the tutorial episode but not in the reference manual.
Reproducible Steps:
With the code below, you can reproduce the figure.
EpiNow2 Version:
The text was updated successfully, but these errors were encountered: