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

Error in check_pars(allpars, pars) : no parameter delta #1

Open
lukmanr opened this issue Mar 8, 2020 · 2 comments
Open

Error in check_pars(allpars, pars) : no parameter delta #1

lukmanr opened this issue Mar 8, 2020 · 2 comments

Comments

@lukmanr
Copy link

lukmanr commented Mar 8, 2020

I am running this on RStudio on MacOSX 10.14.

I ran the model in RStudio and got the following error (full job log output shown below):

"Error in check_pars(allpars, pars) : no parameter delta"

Full job log:

── Attaching packages ────────────────────────────────────────────────────────────────────────────── tidyverse 1.3.0 ──
✓ ggplot2 3.3.0 ✓ purrr 0.3.3
✓ tibble 2.1.3 ✓ dplyr 0.8.5
✓ tidyr 1.0.2 ✓ stringr 1.4.0
✓ readr 1.3.1 ✓ forcats 0.5.0
── Conflicts ───────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()

Attaching package: ‘lubridate’

The following object is masked from ‘package:base’:

date

Loading required package: StanHeaders
rstan (Version 2.19.3, GitRev: 2e1f913d3ca3)
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)

Attaching package: ‘rstan’

The following object is masked from ‘package:tidyr’:

extract

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:lubridate’:

stamp

SAMPLING FOR MODEL 'model10' NOW (CHAIN 1).
Chain 1:
Chain 1: Gradient evaluation took 0.292054 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 2920.54 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1:
Chain 1:
Chain 1: WARNING: No variance estimation is
Chain 1: performed for num_warmup < 20
Chain 1:
Chain 1: Iteration: 1 / 5 [ 20%] (Warmup)
Chain 1: Iteration: 2 / 5 [ 40%] (Warmup)
Chain 1: Iteration: 3 / 5 [ 60%] (Sampling)
Chain 1: Iteration: 4 / 5 [ 80%] (Sampling)
Chain 1: Iteration: 5 / 5 [100%] (Sampling)
Chain 1:
Chain 1: Elapsed Time: 1.22936 seconds (Warm-up)
Chain 1: 7.12388 seconds (Sampling)
Chain 1: 8.35324 seconds (Total)
Chain 1:
Error in check_pars(allpars, pars) : no parameter delta
Calls: sourceWithProgress ... summary -> .local -> check_pars_second -> check_pars
In addition: Warning messages:
1: There were 3 divergent transitions after warmup. Increasing adapt_delta above 0.8 may help. See
http://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
2: Examine the pairs() plot to diagnose sampling problems

3: The largest R-hat is NA, indicating chains have not mixed.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#r-hat
4: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#bulk-ess
5: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#tail-ess
Execution halted

@jriou
Copy link
Owner

jriou commented Mar 8, 2020

Hi, thanks for your interest!

It's a meaningless mistake, it's the print function to show the result of the model test (what you ran is just a test with 5 iterations). It says:

print(T_model10,pars=c("beta","eta","epsilon","rho_K","pi"))

But the "delta" is a remain from a previous model that I didn't change.

If you want to actually run the model, you need to increase the number of iterations to something like 1000. You probably need a computer cluster for that.

Alternatively you can load the posterior samples that I already computed, in the posterior_samples directory.

@lukmanr
Copy link
Author

lukmanr commented Mar 9, 2020

Thanks! I removed the reference to the "delta" parameter and the test completed. It stopped when it hit the load("model/model10_2020-02-28.Rdata") which is being copied down from a dropbox folder of yours :).

I would love to help test and update the code, and make it more widely available to the public. I think this code takes the right approach to modeling the spread of the disease, which is not an easy thing to have done, so kudos to you and your team! This code provides a real service to the global community. Thank you so much for publishing it.

I already wrote down the install process that I followed, which is pretty simple for anyone familiar with R and RStudio. I am not in that category myself - I have not done much work with R before, though I have some experience with probabilistic programming. But I was able to figure out the install process and run the code. Maybe that makes me a good candidate to help - I will have the viewpoint of someone who is new to R!

I work for Google Cloud and access to clusters is not a blocker for me personally, but my goal would be to enable people to run the model on whatever compute infrastructure they have available.

My contact info is available in my github profile and also at linkedin.com/in/lukmanramsey, if you want to reach out to me personally. Again I would love to help make it easy for others to run this model and update parameters and introduce new scenarios (like lockdowns in other countries, etc.) as the situation changes.

Best,
Lukman

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