Initial values are the mean of nrep prior draws, which diverges when the...
Brought to you by:
martyn_plummer
While experimenting with Claude code I became aware of JAGS-5.0.0, and with alot of help from Claude suceeded in compiling a working version on my macmini with an M4 Pro processor. As a check, I asked Claude to run the classic-bugs benchmarks, eventually resulting in the attached bug-report and draft patch (all written by Claude Opus 5. Unfortunately, I'm a mediocre, albeit opinionated sometime statistician. Please feel free to ignore if this is nonsense. Kind Regards. --dws
Anonymous
Sorry, rendered description attached.
Sorry, unfamiliar with this system. Attaching description in .md format.
Following up on previous: the median patch was not a real fix — it repairs dscaled.gamma but breaks dgamma(1e-3, 1e-3), whose median underflows. Since no single summary of prior draws is robust, the estimator choice belongs in the Distribution class — which is what JAGS 4.x already did. The attached patch ports the 4.3.2 typicalValue() interface into 5.0.0 for scalar distributions: RScalarDist::typicalValue() ae verbatim from 4.3.2, andScalarStochasticNode::initialize() tries the typical value first, falling back unchanged to the 5.0.0 prior- defined. The patch is purely additive; everything without an override behaves exactly as stock.
Results (macOS/arm64, classic-bugs): inhaler2 initialises tau to 0.00117284 for every
seed, byte-identical to 4.3.2 to 1 and runs cleanly.
This is a proof of concept — Bern, DCat, DUnif, thevector/array distributions, …) are not ported. If random-draw
Analysis and patch written by Claude Fable 5
Superceded by #69