Replies: 6 comments 3 replies
-
I can see a bug here but first are you looking at fits with the same seed in both R and stan? |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
After updating to the new dist-interface, we made one misspecification as shown in this checklist box for the |
Beta Was this translation helpful? Give feedback.
-
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:
Beta Was this translation helpful? Give feedback.
All reactions