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

stan_utility update for other folders + rstan substitute? #41

Open
sysilviakim opened this issue Feb 22, 2021 · 2 comments
Open

stan_utility update for other folders + rstan substitute? #41

sysilviakim opened this issue Feb 22, 2021 · 2 comments

Comments

@sysilviakim
Copy link

Hi Mike,

I have a couple of questions about the stan_utility script:

  • I think the stan_utility.R's latest version is in the stan_intro folder, but would it help to have a pull request that updates it for all the other folders?
  • Is the check_div, check_treedepth, and check_energy fully substitutable with rstan's own functions, with the caveat that it is rstan::check_divergence and not rstan::check_div?
  • Curious why check_n_eff and check_rhat aren't in the package itself---or did I miss something?

My Stan is a bit rusty at the moment.

@betanalpha
Copy link
Owner

In general the latest case study has the latest version, but I don't think it's changed since the stan_intro case study so one could start there. My only hesitation with PRs for the older case studies is that all of those need a mess of other updates as well that I don't yet have time to implement yet and I'd rather change everything together.

check_div is consistent. check_treedepth is consistent for the default tree depth of 10, but I'm not sure if it checks against user set values. check_energy may use a more conservative threshold of 0.3 instead my recommended 0.2

RStan runs similar check_n_eff and check_rhat automatically in every fit but the thresholds are different. In particular the check_n_eff uses a very different threshold that ends up checking for different things -- see for example my post https://discourse.mc-stan.org/t/suggestions-on-reporting-hmc-diagnostics-for-scientific-publication/20003/14?u=betanalpha. Not sure why these never made separate functions; one issue is that the development is fragmenting a bit and much of the recent development is going into the separate posterior and arviz packages that are making their own decisions outside of general Stan community discussion.

@sysilviakim
Copy link
Author

Thanks for the really informative post. That makes a lot of sense. I'll leave it for now, in that case.

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