betanalpha / knitr_case_studies

Inference case studies in knitr
162 stars 94 forks source link

stan_utility update for other folders + rstan substitute? #41

Open sysilviakim opened 3 years ago

sysilviakim commented 3 years ago

Hi Mike,

I have a couple of questions about the stan_utility script:

My Stan is a bit rusty at the moment.

betanalpha commented 3 years ago

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 commented 3 years ago

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