pymc-bayesian-modelinglisted
Install: claude install-skill jaechang-hits/SciAgent-Skills
# PyMC Bayesian Modeling
## Overview
PyMC is a Python library for Bayesian statistical modeling and probabilistic programming. It provides an expressive syntax for defining probabilistic models and efficient inference via MCMC (NUTS) and variational methods (ADVI). This skill covers the full Bayesian modeling cycle from model specification through diagnostics, comparison, and prediction.
## When to Use
- Estimating parameters with full uncertainty quantification (credible intervals, not just point estimates)
- Fitting hierarchical/multilevel models to grouped or nested data
- Performing prior and posterior predictive checks to validate model assumptions
- Comparing candidate models using information criteria (LOO-CV, WAIC)
- Building regression models (linear, logistic, Poisson) in a Bayesian framework
- Handling missing data or measurement error as latent parameters
- Modeling time series with autoregressive or random walk priors
- Generating posterior predictions for new observations with uncertainty bounds
- Use **Stan/PyStan** instead for compiled, more scalable Bayesian inference on large models; use **statsmodels** for frequentist statistical tests
## Prerequisites
- **Python packages**: `pymc >= 5.0`, `arviz`, `numpy`, `matplotlib`
- **Data**: NumPy arrays or pandas DataFrames with numeric columns
- **Environment**: CPU sufficient for most models; GPU via JAX backend for large models
```bash
pip install pymc arviz numpy matplotlib
# Optional: JAX backend for GPU