bayesian-workflow

Installation
SKILL.md

Bayesian Workflow

Workflow overview

Every Bayesian analysis follows this sequence. Do not skip steps -- especially model criticism.

  1. Formulate — Define the generative story. What underlying process, that we're precisely trying to model, created the data?
  2. Specify priors — See references/priors.md
  3. Implement in PyMC — Write the model. Prefer PyMC 5+ syntax. Use the latest version possible.
  4. Run prior predictive checkspm.sample_prior_predictive(). Verify priors produce plausible data ranges before fitting
  5. Inferencepm.sample(nuts_sampler="nutpie"). Always use nutpie for speed (the nutpie python package provides cutting-edge sampling). Don't hardcode the number of chains — let the sampler pick the best default for the platform.
  6. Diagnose convergence — Use arviz_stats.diagnose(idata) as the first check (requires arviz-stats >= 1.0.0). It covers R-hat, ESS, divergences, tree depth, and E-BFMI in one call. See references/diagnostics.md
  7. Criticize the model — See references/model-criticism.md
  8. Check prior sensitivity — Run psense_summary(idata) to verify conclusions are robust to prior choices. Visualize with plot_psense_dist(idata) from arviz_plots. Requires log_likelihood and log_prior in the InferenceData — compute them after sampling if needed. See references/sensitivity.md
  9. Compare models (if applicable) — See references/model-comparison.md
  10. Report results — See references/reporting.md. When the user asks for a report or mentions a non-technical audience, generate a standalone markdown report file (not just code comments) using the template in reporting.md. Adapt the language to the audience — if they're new to Bayesian stats, include a glossary and plain-language explanations of key concepts.

Installation

Installs
9
GitHub Stars
1.9K
First Seen
14 days ago
bayesian-workflow — brycewang-stanford/auto-empirical-research-skills