1---2name: pymc3description: PyMC Bayesian Modeling4---5# PyMC Bayesian Modeling67## Workflow891. Clarify estimand, data-generating assumptions, likelihood family, grouping structure, missingness, and prediction target.102. Specify priors before seeing fit results. Use weakly informative or domain-informed priors and run prior predictive checks.113. Build the PyMC model with named coordinates/dimensions, stable parameterization, and `pm.Data` when predictions or updates are needed.124. Fit with NUTS by default. Save `InferenceData` with log likelihood when model comparison is needed.135. Diagnose sampling: divergences, R-hat, ESS, BFMI, tree depth, trace plots, and energy plots. Reparameterize before increasing draws blindly.146. Validate fit with posterior predictive checks, residual or calibration checks, sensitivity to priors, and domain plausibility.157. Compare models with LOO/WAIC only when likelihood and data structure make comparison meaningful.168. Report posterior quantities with uncertainty intervals, model limitations, and reproducible code.1718## References1920- Read `references/modeling-workflow.md` for prior, likelihood, diagnostic, and reporting checklists.21- Read `references/legacy-full-skill.md` for older PyMC code patterns and examples when needed.22- Read `bayesian-ppl-diagnostics/references/reference.md` when diagnosing Stan/PyMC/ArviZ outputs across PPLs.2324## Validation2526- Prior predictive checks are shown or explicitly waived with a reason.27- Divergences are investigated, not ignored.28- Posterior claims match the modeled estimand and include uncertainty.