Open avallecam opened 1 week ago
Is the code that generates these in this repo somewhere?
Is the code that generates these in this repo somewhere?
Yes, here https://epiverse-trace.github.io/howto/analyses/reconstruct_transmission/estimate_infections.html
I noticed this locally while upgrading this repository to the latest EpiNow2 and epiparameter versions. Interested to find if I missed specified sth while updating the interfaces
I just reproduced this locally by installing the old version 1.5.2
and then running the howto (copy/paste/run the first chunk in the entry). Then, I upgraded it to the latest 1.6.0
and ran the same script. The code I used to install old and new are in the reprex chunks.
# devtools::install_version(package = "EpiNow2",version = "1.5.2")
packageVersion(pkg = "EpiNow2")
#> [1] ‘1.5.2’
Created on 2024-10-11 with reprex v2.1.1
# pak::pak("EpiNow2")
packageVersion(pkg = "EpiNow2")
#> [1] '1.6.0'
Created on 2024-10-11 with reprex v2.1.1
I kept epiparameter constant in both test.
devtools::package_info(pkgs = "epiparameter")
#> package * version date (UTC) lib source
#> backports 1.5.0 2024-05-23 [1] CRAN (R 4.4.0)
#> checkmate 2.3.2 2024-07-29 [1] CRAN (R 4.4.0)
#> cli 3.6.2 2023-12-11 [1] CRAN (R 4.4.0)
#> distcrete 1.0.3 2017-11-23 [1] CRAN (R 4.4.0)
#> distributional 0.5.0 2024-09-17 [1] CRAN (R 4.4.1)
#> epiparameter 0.2.0.9000 2024-09-23 [1] Github (epiverse-trace/epiparameter@71d2329)
#> fansi 1.0.6 2023-12-08 [1] CRAN (R 4.4.0)
#> generics 0.1.3 2022-07-05 [1] CRAN (R 4.4.0)
#> glue 1.7.0 2024-01-09 [1] CRAN (R 4.4.0)
#> lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.4.0)
#> numDeriv 2016.8-1.1 2019-06-06 [1] CRAN (R 4.4.0)
#> pillar 1.9.0 2023-03-22 [1] CRAN (R 4.4.0)
#> rlang 1.1.4 2024-06-04 [1] CRAN (R 4.4.0)
#> utf8 1.2.4 2023-10-22 [1] CRAN (R 4.4.0)
#> vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.4.0)
#>
#> [1] C:/Users/AndreeValleCampos/AppData/Local/R/win-library/4.4
#> [2] C:/Program Files/R/R-4.4.0/library
Created on 2024-10-11 with reprex v2.1.1
This seems to be an issue with the rt = NULL
option. When I block it, as in the chunk below, I get the following figure output (closer to the one generated by a previous package version).
# Run infection estimation model
epinow_estimates <- epinow(
data = incidence_data, # time series data
# assume generation time = serial interval
generation_time = generation_time_opts(serial_interval_covid),
# delay from infection-to-death
delays = delay_opts(infection_to_death)#,
# no Rt estimation
# rt = NULL
)
packageVersion("EpiNow2")
#> [1] '1.6.0'
Created on 2024-10-13 with reprex v2.1.1
Figure 1
Figure 2