Forces explicit MCAR/MAR/MNAR mechanism statement, then applies MICE with Rubin's-rules pooling or FIML. Warns against single imputation. Uses statsmodels or R mice via Rscript.
Skill type: ANALYSIS MODULE. Missing data is not a nuisance to delete or fill with a mean. The discipline: state the missingness mechanism, then use a method whose uncertainty is honest — multiple imputation with Rubin's-rules pooling, or FIML. The dangerous shortcut is single imputation, which treats guessed values as observed and understates standard errors.
STATE THE MECHANISM (MCAR / MAR / MNAR). MULTIPLY IMPUTE AND POOL BY RUBIN'S RULES —
SINGLE IMPUTATION FAKES CERTAINTY IT DOESN'T HAVE.
| The request is really about… | Route to | Why not this skill |
|---|---|---|
| Modeling on already-complete data | alterlab-statistical-analysis / alterlab-statsmodels | No missingness to handle. |
| FIML inside an SEM / latent-variable model | alterlab-sem-psychometrics | That skill fits the latent model with FIML. |
| Survey weights / design (a different kind of "adjustment") | alterlab-survey-analysis | Design-based inference, not imputation. |
| Whether the study design is sound | alterlab-ssci-design-gate | Design routing. |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-statistical-analysis) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
Running the code. In Claude Code, run analysis code in a throwaway environment instead of installing packages: uv run --python ">=3.11" --with "statsmodels>=0.14" --with pandas python impute.py. This needs no install approval and leaves the user's environment untouched. If uv or the network is unavailable, say so and hand over the script; never report results you did not compute.
| Mechanism | Meaning | Consequence |
|---|---|---|
| MCAR | missingness independent of everything | listwise deletion is unbiased (but wasteful) |
| MAR | missingness depends on observed data | MI / FIML are valid (the workhorse assumption) |
| MNAR | missingness depends on the unobserved value itself | needs a selection / pattern-mixture model + sensitivity analysis |
The mechanism is an assumption, largely untestable (MAR vs MNAR especially) — state it and
justify it; inspect the missingness pattern (mice::md.pattern) and test MCAR (Little's test) as
supporting evidence, not proof.
Create m completed datasets (each imputes with added noise reflecting uncertainty), analyze each, then pool: the point estimate is the mean across imputations; the SE combines within-imputation and between-imputation variance (Rubin's rules), so it honestly reflects imputation uncertainty.
Python — statsmodels MICE:
import statsmodels.api as sm
from statsmodels.imputation import mice
imp = mice.MICEData(df) # chained-equations imputer over the frame
fit = mice.MICE("y ~ x1 + x2", sm.OLS, imp).fit(n_burnin=10, n_imputations=20)
fit.summary() # pooled estimates + SEs (Rubin's rules)
R — mice (field standard):
library(mice)
md.pattern(data) # inspect the missingness pattern
imp <- mice(data, m = 20, method = "pmm") # m completed datasets
fit <- with(imp, lm(y ~ x1 + x2))
summary(pool(fit)) # Rubin's-rules pooling (fmi, lambda, df)
FIML — for likelihood/SEM models under MAR, full-information ML uses all available data without
explicit imputation; route to alterlab-sem-psychometrics when the model is latent-variable.
IterativeImputer returns a single completed dataset and does not pool by
Rubin's rules — the sklearn docs say so explicitly. It is fine for a prediction pipeline, but using
it as "multiple imputation" for inference understates uncertainty. If you must, run it repeatedly
with sample_posterior=True and different seeds and pool manually — but mice/statsmodels MICE do
this correctly out of the box.Rule of thumb: m at least the percentage of incomplete cases (higher fraction of missing information → larger m); modern guidance often uses m ≈ 20–50. Report m and the fraction of missing information (FMI).
MECHANISM: MCAR / MAR / MNAR — stated and justified; pattern inspected (md.pattern)
METHOD: MICE (m, imputation model) with Rubin's-rules pooling | FIML | (deletion only if MCAR)
POOLING: estimates + SEs pooled by Rubin's rules; report FMI
SENSITIVITY: for MNAR, a sensitivity analysis (selection / pattern-mixture)
references/mechanisms_and_pooling.md — MCAR/MAR/MNAR detail, Rubin's-rules math, FIML vs MI, m guidance, the sklearn caveat.Part of the AlterLab Academic Skills suite.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
missing-data, multiple-imputation, mice, rubins-rules, fiml, statistical-analysis
2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
241 skills in this plugin
/alterlab-abm-mesaBuilds agent-based models of social systems with Mesa 3 — the current AgentSet API (model.agents.shuffle_do('step'), auto-assigned unique_id, mandatory super().__init__(rng=...)), cell spaces (mesa.discrete_space OrthogonalMooreGrid / classic mesa.space grids), the DataCollector, batch_run parameter sweeps, and SolaraViz — for emergence, segregation, diffusion, opinion dynamics, and cooperation models. It uses the Mesa 3.x API (the old mesa.time schedulers like RandomActivation are removed) and treats the model as a generative theory to be validated, not just run. Use when the request mentions an agent-based model, Mesa, simulating interacting agents, or emergent macro behavior from micro rules. For discrete-event (queueing/process) simulation prefer alterlab-simpy; for reinforcement learning prefer alterlab-stable-baselines3. Part of the AlterLab Academic Skills suite./alterlab-academic-careerPrepares academic career documents and professional-development materials for faculty and researchers. Use when drafting academic CVs, research statements, teaching philosophies, diversity statements, faculty-position cover letters, tenure dossiers, promotion narratives, academic portfolios, or mentorship statements, and when planning conference-networking strategy, building academic web presence, setting up ORCID profiles, or understanding impact metrics. Part of the AlterLab Academic Skills suite.Not loaded · from alterlab-writing-tools
Claude Code won't load this skill
It ships in alterlab-writing-tools at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Generated from the plugin's indexed repository (alterlab-ieu/alterlab-academic-skills) — no native marketplace selected
npx claudepluginhub p/alterlab-ieu-alterlab-writing-toolsOther plugins' skills for the same job