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

Issue in unevaluated vignette chunk #66

Open
Bisaloo opened this issue Nov 14, 2022 · 1 comment
Open

Issue in unevaluated vignette chunk #66

Bisaloo opened this issue Nov 14, 2022 · 1 comment

Comments

@Bisaloo
Copy link
Member

Bisaloo commented Nov 14, 2022

Initially reported by @avinashladdha.

There is a bug in this unevaluated chunk:

```{r, epinow2 with epiparameter analysis, eval=FALSE}
# estimate Rt by date of infection
out <- epinow(
reported_cases = reported_cases,
generation_time = generation_time_list,
rt = rt_opts(prior = list(mean = 2, sd = 0.1)),
delays = delay_opts(incubation_period_list, reporting_delay),
stan = stan_opts(samples = 750, chains = 4),
return_output = TRUE,
verbose = FALSE
)
```

Logging threshold set at INFO for the EpiNow2 logger
Writing EpiNow2 logs to the console and: /tmp/RtmpHlOqyY/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/RtmpHlOqyY/epinow/2020-04-01.log
error occurred during calling the sampler; sampling not done
error occurred during calling the sampler; sampling not done
error occurred during calling the sampler; sampling not done
error occurred during calling the sampler; sampling not done
WARN [2022-11-14 11:51:02] epinow: some chains had errors; consider specifying chains = 1 to debug - .local, object, ...
here are whatever error messages were returned
[[1]]
Stan model 'estimate_infections' does not contain samples.

[[2]]
Stan model 'estimate_infections' does not contain samples.

[[3]]
Stan model 'estimate_infections' does not contain samples.

[[4]]
Stan model 'estimate_infections' does not contain samples.

Error in dimnames(x)$parameters :
$ operator is invalid for atomic vectors

I traced back the error to this line but didn't dig more:

https://github.com/epiforecasts/EpiNow2/blob/f9e9fa653190ac2ed9b650f0bf504d7319134bf4/R/estimate_infections.R#L484

You can browse into the code by using:

out <- estimate_infections(
  reported_cases = reported_cases,
  generation_time = generation_time_list,
  rt = rt_opts(prior = list(mean = 2, sd = 0.1)),
  delays = delay_opts(incubation_period_list, reporting_delay),
  stan = stan_opts(samples = 750, chains = 1),
  verbose = FALSE
)
@joshwlambert
Copy link
Member

This code was removed in #132. However, keeping this issue open for when writing the transmission vignette.

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

No branches or pull requests

2 participants