gp3bayes separates four questions that are often
incorrectly collapsed:
A positive answer to an earlier question does not guarantee a positive answer to a later one.
For approved binary and duration fits,
diagnose_binary_fit() and
diagnose_duration_fit() report:
The default thresholds are deliberately inspectable:
| Component | Pass | Review | Fail |
|---|---|---|---|
| R-hat | at most 1.01 | above 1.01 through 1.05 | above 1.05 |
| Bulk ESS per chain | at least 100 | 50 through below 100 | below 50 |
| Tail ESS per chain | at least 100 | 50 through below 100 | below 50 |
| Divergences | zero | not used | one or more |
| Treedepth saturation | zero | above zero through 1% | above 1% |
| E-BFMI | at least 0.30 | 0.20 through below 0.30 | below 0.20 |
These are package reporting thresholds, not mathematical proofs. The
overall status is fail when any component fails,
review when any component requires review or cannot be
assessed, and pass only when all components pass.
A diagnostic object always records:
Diagnostics assessed: TRUE
Automatic convergence claim: FALSE
Posterior adequacy established: FALSE
This design prevents a single threshold or a successful sampler return code from being converted into an unsupported claim.
The optional bayesplot dependency supports trace,
energy, treedepth, and divergence views.
plot_sampling_diagnostics(
binary_fit,
type = "trace"
)
plot_sampling_diagnostics(
binary_fit,
type = "energy"
)
plot_sampling_diagnostics(
binary_fit,
type = "treedepth"
)
plot_sampling_diagnostics(
binary_fit,
type = "divergence"
)Plots complement numerical summaries. They do not replace them.
A failure should lead to model-specific investigation rather than automatic suppression. Possible actions include:
Increasing adapt_delta, iterations, or treedepth without
understanding the problem is not treated as model validation.
Appropriate:
Sampling completed. All declared numerical diagnostic thresholds passed. Posterior adequacy and substantive validity were assessed separately.
Inappropriate:
The model converged and is valid because R-hat was below 1.05.
The structured reports generated by
create_binary_model_report() and
create_duration_model_report() use the conservative
form.