Survey Kit
Tools for addressing missing data problems (nonresponse bias and item missingness) including extremely fast calibration weighting and machine learning-based imputation.
A furlough project inspired by the code used for the U.S. Census Bureau for the National Experimental Wellbeing Statistics (NEWS) project.
Installation
uv add survey-kit
# or
pip install survey-kit
Running regressions with multiply imputed data (below) can be easier with the tools noted below, but they are not added as dependencies by default. Add only what you use:
uv add "survey-kit[pyfixest]" # or [statsmodels], [linearmodels], [polars-ds], [r], [stata]
uv add "survey-kit[all-stats]" # everything at once
For R and Stata, there's some additional setup you need to do to get them working with python. See rpy2's installation instructions and pystata's documentation.
Features
- Calibration Weighting - Fast entropy balancing for nonresponse bias
- SRMI Imputation - ML-based multiple imputation with checkpointing
- Statistics & Standard Errors - Proper variance estimation for complex surveys
- Running regressions with multiply imputed data using standard python, R, or Stata tools - statsmodels, linearmodels, pyfixest, R, and Stata behind one interface
Works with Polars, Pandas, Arrow, and DuckDB.
Documentation
Full documentation: https://jrothbaum.github.io/survey_kit/
- Calibration Guide
- Imputation Guide
- Statistics Guide
- Guide to running regressions with multiply imputed data using standard python, R, or Stata tools
Support
License
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
Release files for survey-kit 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| survey_kit-0.2.0.tar.gz | 18.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| survey_kit-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.8 MB
Release files / survey_kit-0.2.0.tar.gz
| Download URL | survey_kit-0.2.0.tar.gz |
|---|---|
| Size | 18.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a3eb588a5e46d39b614181d50c96a2c1cda4abcaebf759df9b524ef110a6245
|
|
BLAKE2b-256 checksum How to use checksums |
c373273be64b2f0e433b8acce4f661f462eda9ce7eefc3349509a591d75ea6f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / survey_kit-0.2.0-py3-none-any.whl
| Download URL | survey_kit-0.2.0-py3-none-any.whl |
|---|---|
| Size | 433.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
498d625148f0cc2ed46c00010ba3c09d78c6903d49de6c4152454c49a3461a14
|
|
BLAKE2b-256 checksum How to use checksums |
74e883ffa72a9b98127efbd780424aab56fceccff6a5338477e8c2f9f7c482ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|