naobservatory / p2ra

4 stars 1 forks source link

Assess HMC mixing statistics #177

Open dp-rice opened 1 year ago

dp-rice commented 1 year ago

Stan produces some information about the mixing and rejection rate of the markov chain. We should plot this as part of our model checking.

athowes commented 1 year ago

Here is a notebook doing something similar (checking HMC results are suitable) for a project I'm working on. The bayesplot R package is pretty good for this. Perhaps there is a Python equivalent.

dp-rice commented 1 year ago

Thanks @athowes this is really helpful!

athowes commented 1 year ago

Recent idea I've borrowed for this is to take the parameter with the lowest ESS or highest R hat or and present the traceplot for that. If even for the worst parameters they look OK then you should be fine for the others (I think this is reasonable in an academic context when a reviewer would want to know they look reasonable but doesnt want to look at 100s of traceplots, maybe less utility outside a paper context).

Here's an example:

image
dp-rice commented 1 year ago

That's a good idea! We're putting this off for now, but will revisit when we're preparing for preprint submission