pymc-bayesian-modeling

Perform Bayesian inference with PyMC using MCMC sampling and ArviZ diagnostics.

18|1|Updated Dec 27, 2025
One-click install
npx skills add https://github.com/LogauaEngstrom/claude-scientific-skills --skill pymc-bayesian-modeling-logauaengstrom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymc-bayesian-modeling
Source: https://github.com/LogauaEngstrom/claude-scientific-skills/tree/main/scientific-skills/pymc
Command: npx skills add https://github.com/LogauaEngstrom/claude-scientific-skills --skill pymc-bayesian-modeling-logauaengstrom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

Build, fit, validate, and compare Bayesian models using PyMC to quantify uncertainty and perform principled inference.

Core Features & Use Cases

  • Supports hierarchical and time-series models with MCMC (NUTS) and variational inference.
  • Includes model comparison (LOO/WAIC), posterior checks, and diagnostics via ArviZ.
  • Provides templates and references to common workflows for Bayesian analysis.

Quick Start

Define a simple Bayesian linear regression, run a short MCMC sampler, and review the diagnostics to confirm convergence.

Frequently Asked Questions about pymc-bayesian-modeling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform Bayesian inference with PyMC for a hierarchical model?

Bayesian inference with PyMC involves defining a hierarchical model, specifying priors, and running MCMC sampling to estimate posterior distributions. This Skill enforces a standard workflow including prior predictive checks and ArviZ diagnostics to validate convergence.

What is the best way to compare Bayesian models using LOO and WAIC?

Model comparison using LOO and WAIC is performed by evaluating posterior samples with ArviZ. This Skill provides templates for computing information criteria, allowing you to quantify and compare the predictive accuracy of different Bayesian models.

Can I use variational inference instead of MCMC for probabilistic programming in PyMC?

Yes, variational inference is supported alongside MCMC (NUTS) for probabilistic programming. This allows you to fit Bayesian models faster on larger datasets while still performing posterior predictive checks and generating ArviZ-compatible diagnostics.

How do I validate posterior distributions and run predictive checks for scientific datasets?

Posterior predictive checks validate Bayesian models by comparing simulated data to observed scientific datasets. This Skill enforces a standard workflow with named dimensions and ArviZ diagnostics to ensure your posterior distributions accurately represent the underlying data.

Does this approach work for time-series datasets in biology, chemistry, and engineering?

Yes, Bayesian modeling with PyMC supports time-series datasets across biology, chemistry, medicine, and engineering. It handles complex relationships by combining hierarchical structures with MCMC or variational inference to quantify uncertainty in scientific data.

Why should I use ArviZ for diagnostics when running MCMC sampling?

ArviZ provides essential diagnostics for MCMC sampling by evaluating convergence and posterior distributions. This Skill integrates ArviZ to enforce a standard Bayesian workflow, ensuring your probabilistic inference results are valid and reliable.