Skip to content
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

Documentation for forecast argument suggests can be NULL but errors #911

Open
jamesmbaazam opened this issue Jan 7, 2025 · 0 comments · May be fixed by #912
Open

Documentation for forecast argument suggests can be NULL but errors #911

jamesmbaazam opened this issue Jan 7, 2025 · 0 comments · May be fixed by #912

Comments

@jamesmbaazam
Copy link
Contributor

Type of issue:
Commenting on existing documentation.

Detail:

The documentation of forecast in epinow() and estimate_infections() says "... If NULL then no forecasting will be one", suggesting you can set forecast = NULL but this errors.

generation_time <- Gamma(
  shape = Normal(1.3, 0.3),
  rate = Normal(0.37, 0.09),
  max = 14
)
incubation_period <- LogNormal(
  meanlog = Normal(1.6, 0.06),
  sdlog = Normal(0.4, 0.07),
  max = 14
)
reporting_delay <- LogNormal(mean = 2, sd = 1, max = 10)

reported_cases <- example_confirmed[1:40]

# estimate Rt and nowcast/forecast cases by date of infection
epinow(
  data = reported_cases,
  generation_time = gt_opts(generation_time),
  rt = rt_opts(prior = LogNormal(mean = 2, sd = 0.1)),
  delays = delay_opts(incubation_period + reporting_delay),
  forecast = NULL # as suggested in docs but errors
)

Logging threshold set at INFO for the name logger
Writing EpiNow2 logs to the console and: /var/folders/vr/dn4r1_zj417drd1zr9301trw0000gp/T//RtmpdLzOzR/regional-epinow/2020-04-01.log.
Logging threshold set at INFO for the name logger
Writing EpiNow2.epinow logs to the console and: /var/folders/vr/dn4r1_zj417drd1zr9301trw0000gp/T//RtmpdLzOzR/epinow/2020-04-01.log.

Error in if (horizon != 0) { : argument is of length zero

@jamesmbaazam jamesmbaazam changed the title Documentation for forecast argument suggests can be NULL but not implemented Documentation for forecast argument suggests can be NULL but errors Jan 7, 2025
@jamesmbaazam jamesmbaazam linked a pull request Jan 8, 2025 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant