ImperialCollegeLondon / covid19model

Code for modelling estimated deaths and cases for COVID19.
MIT License
944 stars 271 forks source link

Error "Rejecting initial value" #106

Closed hellenlima closed 4 years ago

hellenlima commented 4 years ago

When running: Rscript base.r base --debug or even in the full mode: Rscript base.r base --full

I am getting the following error message:

Chain 2: Rejecting initial value:
Chain 2:   Error evaluating the log probability at the initial value.
Chain 2: Exception: neg_binomial_2_lpmf: Failures variable[53] is -6, but must be
 >= 0!  (in 'model266c65b51bc8_base' at line 87)

Chain 2:
Chain 2: Initialization between (-2, 2) failed after 100 attempts.
Chain 2:  Try specifying initial values, reducing ranges of constrained values, o
r reparameterizing the model.
[1] "Error in sampler$call_sampler(args_list[[i]]) : Initialization failed."
[1] "error occurred during calling the sampler; sampling not done"
[1] "Error in sampler$call_sampler(args_list[[i]]) : Initialization failed."
[1] "error occurred during calling the sampler; sampling not done"
here are whatever error messages were returned
[[1]]
Stan model 'base' does not contain samples.

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

Warning message:
In .local(object, ...) :
  some chains had errors; consider specifying chains = 1 to debug
Stan model 'base' does not contain samples.
[1] "Jobid = 1277907"
This is bayesplot version 1.7.1
- Online documentation and vignettes at mc-stan.org/bayesplot
- bayesplot theme set to bayesplot::theme_default()
   * Does _not_ affect other ggplot2 plots
   * See ?bayesplot_theme_set for details on theme setting
[1] "Generating covariate size effects plot"
This is bayesplot version 1.7.1
- Online documentation and vignettes at mc-stan.org/bayesplot
- bayesplot theme set to bayesplot::theme_default()
   * Does _not_ affect other ggplot2 plots
   * See ?bayesplot_theme_set for details on theme setting

********************************************************
Note: As of version 1.0.0, cowplot does not change the
  default ggplot2 theme anymore. To recover the previous
  behavior, execute:
  theme_set(theme_cowplot())
********************************************************

Attaching package: 'cowplot'

The following object is masked from 'package:ggpubr':

    get_legend

Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x),  :
  'data' must be of a vector type, was 'NULL'
Calls: data.frame -> as.matrix -> as.matrix.default -> array
Execution halted
Error: Error while plotting covariate size effects! Code: 1
Execution halted

It is worth to note that I was running the model daily without any problems.

Did anyone have a similar issue? Any idea of how to solve it?

Desktop:

hellenlima commented 4 years ago

Just found out what happened. Apparently Denmark learned how to resurrect people during the pandemic 😆

Screen Shot 2020-05-13 at 23 16 13
s-mishra commented 4 years ago

that is what ecdc does at times. Just need to reset it