monitoring posterior probability in nimble

17 views
Skip to first unread message

Brook Milligan

unread,
May 27, 2026, 6:40:58 PM (6 days ago) May 27
to nimble-users
I am aware of the manual approach of monitoring the posterior probability of a model as described here from several years ago:


https://danielturek.github.io/public/sumPostLogDens/sumPostLogDens.html

In the intervening time, has a more automated means (e.g., nimble function) of accomplishing this been developed?

Cheers,
Brook

Daniel Turek

unread,
May 28, 2026, 7:27:53 AM (5 days ago) May 28
to Brook Milligan, nimble-users
Brook, within the past year or so we added a system for monitoring and recording "derived quantities" during an MCMC run.  There are pre-written mechanisms for monitoring:

- the cumulative mean (and/or variance) of any specified model nodes
- the sum of the posterior (log) probability of the entire model, or of arbitrary sets of nodes
- one can also write their own "derived quantity" nimbleFunction, for recording any quantity you might want

So, using the pre-written option for posterior (log) probabilities is what you're looking for.  Instead of describing all the syntax here, I'll point you to some documentation, which should explain everything:


Also documented in the Nimble User Manual:

After you set up the derived quantities you want (when configuring the MCMC), the recorded values will be available in the object returned from runMCMC().

Let me know if anything doesn't make sense, or you have additional questions!

Cheers,
Daniel



--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/nimble-users/C9932335-E0C4-4937-8439-8FC1277CC5F7%40biology.nmsu.edu.
Reply all
Reply to author
Forward
0 new messages