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

Do you need to set a starting seed for repeatability? #106

Closed
akeyel opened this issue Aug 27, 2024 · 2 comments
Closed

Do you need to set a starting seed for repeatability? #106

akeyel opened this issue Aug 27, 2024 · 2 comments
Assignees
Milestone

Comments

@akeyel
Copy link
Contributor

akeyel commented Aug 27, 2024

Describe the improvement that needs to be made

How repeatable are the MCMC model runs? I.e. would you get different results if you ran the model multiple times?
Would using set.seed() be honored by the underlying STAN code, or would it just get ignored?

@dylanhmorris
Copy link
Collaborator

The Stan PRNG seed is set separately from the R PRNG seed. Within the package, it is configured via get_mcmc_options
https://cdcgov.github.io/ww-inference-model/reference/get_mcmc_options.html

It strikes me that:

  1. This should be better documented.
  2. Currently, there is a fixed default (seed = 123). That should not be the case. I think I would advocate for default seed = NULL.
  3. There's also the matter of seeding the random initial values. See R PRNG seeding when generate_random_inits = TRUE? #107.

@dylanhmorris
Copy link
Collaborator

This is addressed as of #175

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

3 participants