One-click install
npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill pymc-estrella-231
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymc
Source: https://github.com/Estrella-231/Mathematical_modeling_tongmeng/tree/main/.agents/skills/pymc
Command: npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill pymc-estrella-231

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires arviz, numpy, matplotlib, pandas, and includes references (resource) and assets (resource) and scripts (resource) components.

What problem does it solve?

This Skill solves the problem of turning uncertain, real-world data into statistically grounded Bayesian inference with trustworthy diagnostics and predictions.

Core Features & Use Cases

  • Bayesian model construction: Define priors, likelihoods, and hierarchical structures using PyMC’s modern modeling API.
  • Inference and uncertainty quantification: Fit models with MCMC (NUTS) or variational inference (ADVI), then interpret posterior distributions.
  • Validation and comparison: Run prior/posterior predictive checks and compare models using LOO/WAIC with convergence diagnostics.
  • Common use cases: Regression (linear/logistic/Poisson), multilevel/hierarchical models, time series, robust likelihoods, missing data, and measurement error.

Quick Start

Use the pymc skill to fit and validate a Bayesian hierarchical regression model with MCMC and posterior predictive checks for a grouped dataset.

Frequently Asked Questions about pymc

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

FAQPage Schema
How do I build a Bayesian regression model with uncertainty quantification?

Bayesian regression models are built by specifying priors and likelihoods to infer posterior distributions from noisy data. You fit the model using MCMC NUTS or ADVI, then interpret the resulting posterior distributions to quantify uncertainty in your predictions.

How do I validate Bayesian models and compare them using LOO or WAIC?

Bayesian models are validated using posterior predictive checks and convergence diagnostics like R-hat, ESS, and divergences. Model comparison leverages log-likelihood to calculate LOO or WAIC scores, providing statistically grounded metrics to evaluate and select the best performing model.

Can I use PyMC for hierarchical and multilevel regression workflows?

Hierarchical and multilevel regression workflows are fully supported using modern modeling APIs. You can define grouped structures, fit them with MCMC or variational inference, and handle complex use cases including robust likelihoods, missing data, and measurement error.

What do I need to diagnose MCMC NUTS convergence issues in Bayesian inference?

MCMC NUTS convergence requires checking diagnostics such as R-hat, ESS, and divergences. Running these checks ensures the posterior distributions are statistically valid, which is essential before performing posterior predictive checks or model comparison.

Are pandas and numpy enough to prepare data for Bayesian modeling?

Pandas and numpy are sufficient for structuring input data arrays before specifying priors and likelihoods. Matplotlib and arviz are also required for visually validating convergence diagnostics and posterior predictive checks after fitting the model.