Skip to main content

iArt: A Generalized Framework for Imputation-Assisted Randomization Tests

Project description

iArt: Imputation-Assisted Randomization Tests

Authors

Jiawei Zhang*, Siyu Heng*, and Yang Feng (* indicates equal contribution)

Maintainers

Jiawei Zhang (Email: jz4721@nyu.edu), Siyu Heng (Email: siyuheng@nyu.edu), and Yang Feng (Email: yang.feng@nyu.edu)

Description

iArt (Imputation-Assisted Randomization Tests) is a Python package designed for conducting finite-population-exact randomization tests in design-based causal studies with missing outcomes. It offers a robust solution to handle missing data in causal inference, leveraging the potential outcomes framework and integrating various outcome imputation algorithms.

Installation

To install iArt, run the following command:

pip install python-iArt

Usage

Here is a basic example of how to use iArt:

import numpy as np
import iArt

Z = [1, 1, 1, 1, 0, 0, 0, 0]
X = [[5.1, 3.5], [4.9, np.nan], [4.7, 3.2], [4.5, np.nan], [7.2, 2.3], [8.6, 3.1], [6.0, 3.6], [8.4, 3.9]]
Y = [[4.4, 0.5], [4.3, 0.7], [4.1, np.nan], [5.0, 0.4], [1.7, 0.1], [np.nan, 0.2], [1.4, np.nan], [1.7, 0.4]]
result = iArt.test(Z=Z, X=X, Y=Y, L=1000, verbose=True)
print(result)

Detailed usage can be found here ReadDoc

Features

  • Conducts finite-population-exact randomization tests.
  • Handles missing data in causal inference studies.
  • Supports various outcome imputation algorithms.
  • Offers covariate adjustment in exact randomization tests.

Contributing

Your contributions to iArt are highly appreciated! If you're looking to contribute, we encourage you to open issues for any bugs or feature suggestions, or submit pull requests with your proposed changes.

Setting Up a Development Environment

To set up a development environment for contributing to iArt, follow these steps:

python -m venv venv
source venv/bin/activate 
pip install -r requirements.txt
python setup.py install

This creates a virtual environment (venv) for Python and activates it, allowing you to work on the package without affecting your global Python environment.

License

This project is licensed under the MIT License

Citation

If you use iArt in your research, please consider citing it:

@misc{heng2023designbased,
      title={Design-Based Causal Inference with Missing Outcomes: Missingness Mechanisms, Imputation-Assisted Randomization Tests, and Covariate Adjustment}, 
      author={Siyu Heng and Jiawei Zhang and Yang Feng},
      year={2023},
      eprint={2310.18556},
      archivePrefix={arXiv},
      primaryClass={stat.ME}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-iArt-0.1.4.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_iArt-0.1.4-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file python-iArt-0.1.4.tar.gz.

File metadata

  • Download URL: python-iArt-0.1.4.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.8

File hashes

Hashes for python-iArt-0.1.4.tar.gz
Algorithm Hash digest
SHA256 7b4d06a0be94a10dd864aad827278fa1b0e621d484eafa243ca81e192fad25c3
MD5 d1b05dd3ee613f48db64d02f2b0a648d
BLAKE2b-256 c55bec2fb80683a4fdbd9f3a4d14b8f49d68fd39ef52cc3c0f538cb4d3070d32

See more details on using hashes here.

File details

Details for the file python_iArt-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: python_iArt-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.8

File hashes

Hashes for python_iArt-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 94fe1ce5c36fad483579c24dbb64330ab6137928226e1f3a24128be0454c8d64
MD5 a2daf69613caf40e357a13acca454e74
BLAKE2b-256 ac4749a9834c5dcdda97b972ac61faa48d7636ec13afeca4bbcf2455452d00eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page