What problem does it solve? Bayesian analysis code often mishandles posterior artifacts: chains get flattened, groups get mislabeled, and diagnostics like R-hat or PSIS-LOO get reported without the checks that make them meaningful. This Skill guides writing, reviewing, debugging, and testing Python code that uses ArviZ so inference data keeps correct chain/draw structure, coordinates, and provenance. ## Core Features & Use Cases - Labeled conversion: Convert raw chain x draw x domain arrays into ArviZ 1.x DataTree groups with explicit dims, coords, and uniqueness assertions. - Convergence diagnostics: Apply rank R-hat, bulk/tail ESS, MCSE, and sampler statistics correctly, reporting problematic variables and coordinates rather than a single global number. - Predictive checks and model comparison: Run posterior predictive checks and PSIS-LOO comparisons only when observations, likelihood targets, and pointwise log likelihood are compatible, with Pareto-k inspection. - Use Case: You receive flattened MCMC samples from a colleague's PyMC run. Use this Skill to reshape them into chain x draw x feature arrays, build a labeled DataTree, verify convergence per coordinate, and compare against a baseline model with valid pointwise log likelihood. ## Quick Start Ask the AI to convert your posterior arrays into a labeled ArviZ DataTree and run convergence diagnostics with R-hat, ESS, and MCSE per variable.