cyberneticlibrary

Build Bayesian statistical models

pymcskillsetup L227,559
K-Dense-AI/scientific-agent-skills
What it does

Build and fit Bayesian hierarchical models with MCMC

Best for

When you need quantified uncertainty in a statistical model and can validate priors beforehand.

Inputs
  • · data (predictors, outcomes)
  • · prior specifications
  • · model structure (coords, dims)
Outputs
  • · InferenceData object
  • · posterior samples
  • · diagnostics (R-hat, ESS, divergences)
Requires
  • · Python 3.12+
  • · PyMC 6.0.1
  • · PyTensor
  • · ArviZ
Preconditions
  • · data standardized and missing values handled
  • · priors validated via prior predictive check
Failure modes
  • · divergences indicate posterior complexity
  • · low ESS from high posterior correlation
  • · multimodality (high R-hat)
Trust signals
  • · prior predictive check before fitting
  • · posterior predictive check vs observed
  • · R-hat < 1.01 and ESS > 400