Install any skill in seconds. Free to start, no credit card required.
Get Started Free →brycewang-stanford/svy
Complex survey analysis: strata/PSU/weights, variance estimation (Taylor, BRR, jackknife, bootstrap), survey GLM, domain analysis, calibration. Polars-native.
Passed 22 of 23 test cases with the skill, and 7 of 23 without it.
and 25 more in the full report
16 fixed6 passed either way0 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 16 test cases the skill fixed. Same model, same prompt, with and without the skill.
I loaded my survey data using `polars.read_parquet('survey.parquet')`. Can I pass this Polars DataFrame directly into `svy.Sample(data=df, design=design)` without converting it to pandas?
| Checked | Without skill | With skill |
|---|---|---|
| Confirms that Polars DataFrames are natively supported by svy. | Missed | Passed |
The instructions your model reads when the skill loads.
svy: design-based analysis of complex survey data in Python. Covers survey design specification (strata, PSU, weights, FPC), variance estimation (Taylor linearization, BRR, jackknife, bootstrap), descriptive estimation (means, totals, proportions, ratios, medians), survey-weighted GLM regression (gaussian, binomial, Poisson), domain/subpopulation analysis, calibration, and survey data I/O (SAS, SPSS, Stata). Uses Polars DataFrames natively. Use when analyzing data from complex sample surveys (NHANES, CPS, ACS PUMS, MEPS, ECLS-K, BRFSS, DHS). For non-survey regression, use statsmodels; for fixed effects, use pyfixest; for panel/IV models, use linearmodels.
Comprehensive skill for complex survey data analysis with svy. Use decision trees below to find the right guidance, then load detailed references.
svy is the Python package for design-based analysis of complex survey data:
This skill targets svy 0.13.0 (released 2026-03-25). svy supersedes samplics (archived 2026-03-10), an earlier library by the same author (Mamadou S. Diallo, Ph.D.). Key differences from samplics:
Sample object replaces separate TaylorEstimator / ReplicateEstimator classessvy.io)| File | Purpose | When to Read |
|---|---|---|
estimation.md | Means, totals, proportions, ratios, medians, domain estimation, cross-tabs, hypothesis tests | Descriptive survey statistics |
regression.md | Survey-weighted OLS, logistic, Poisson regression; extracting results; diagnostics | Survey regression models |
design-weights.md | Design specification, replicate weights, weight manipulation, variance setup, survey data I/O, federal survey patterns | Setting up the survey design object |
design-weights.md then estimation.mddesign-weights.md then regression.mdtest cases passed, vs 7 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.