Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

My Logo


Downloads PyPI License

mcartest provides statistical tests for assessing whether missing data is Missing Completely At Random (MCAR), the assumption most imputation methods quietly depend on. It implements Little's chi-square test across the full dataset and pairwise t-tests between every combination of features, returning results as a readable matrix rather than a single opaque p-value.

Where most implementations stop at significance, mcartest also reports Cohen's d effect sizes, because a p-value alone is misleading: with a large sample, a trivial difference becomes "significant," while a real association in a sparse missing-group may never reach the threshold. Effect sizes tell you how strongly missingness is tied to a feature, not just whether the test rejected.

Results can be returned as raw p-values, as human-readable MCAR / not-MCAR labels, or as effect-size magnitude bands (negligible, small, medium, large) reported only where MCAR is rejected, since under MCAR there is no association to quantify. Styling helpers render the matrices with color-coded cells in notebooks and export them straight to Excel.

Built on pyampute (BSD 3-Clause), extended with the effect-size and labeling functionality described above.

Prerequisites

Before installing mcartest, ensure your system meets the following requirements:

Python Version

mcartest requires Python 3.8 or higher. Specific dependency versions vary depending on your Python version.

Dependencies

The following dependencies will be automatically installed with mcartest:

  • jinja2>=3.0.0
  • numpy>=1.19.0
  • openpyxl>=3.0.0
  • pandas>=1.3.0
  • scipy>=1.5.0
  • tqdm>=4.62.01

💾 Installation

You can install mcartest directly from PyPI:

pip install mcartest

📄 Official Documentation

Documentation

🌐 Author Website

https://www.mii.ucla.edu/

⚖️ License

mcartest is distributed under the Apache License. See LICENSE for more information.

This library includes code derived from pyampute, used under the BSD 3-Clause License. See NOTICE and THIRD_PARTY_LICENSES.md for attribution and the full third-party license text.

📚 Citing mcartest

If you use mcartest in your research or projects, please consider citing it.

Support

If you have any questions or issues with mcartest, please open an issue on this GitHub repository.

Acknowledgements

This work builds on pyampute by Rianne Schouten and Davina Zamanzadeh, whose implementation of Little's MCAR test and the pairwise t-test approach forms the statistical core of this library. The effect-size and labeling extensions were added on top of their work and are also being contributed back upstream.

References

  1. Little, R. J. A. (1988). A Test of Missing Completely at Random for Multivariate Data with Missing Values. Journal of the American Statistical Association, 83(404), 1198-1202. https://doi.org/10.1080/01621459.1988.10478722

  2. Schouten, R. M., Lugtig, P., & Vink, G. (2018). Generating missing values for simulation purposes: A multivariate amputation procedure. Journal of Statistical Computation and Simulation, 88(15), 2909-2930. https://doi.org/10.1080/00949655.2018.1491577

  3. Schouten, R. M., Zamanzadeh, D., & Singh, P. (2022). pyampute: a Python library for data amputation. Zenodo. https://doi.org/10.25080/majora-212e5952-03e

Download files

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

Source Distribution

mcartest-0.0.0a4.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

mcartest-0.0.0a4-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file mcartest-0.0.0a4.tar.gz.

File metadata

  • Download URL: mcartest-0.0.0a4.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for mcartest-0.0.0a4.tar.gz
Algorithm Hash digest
SHA256 580b757fe72e182e5c7f75af69828510755333b856735b303c0a6aabc33c03a5
MD5 611e3410236e27a98b8065a50c53a3d2
BLAKE2b-256 54c668e315e6a6640f0b9aa66180a2bfb9b22535252c569cd35e05e6b9da00f3

See more details on using hashes here.

File details

Details for the file mcartest-0.0.0a4-py3-none-any.whl.

File metadata

  • Download URL: mcartest-0.0.0a4-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for mcartest-0.0.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 feacb906b06c87ce3a45308fbd7f6d17ce56f08de91461e502983f4289ac3ee5
MD5 caf22da7f701331dc58f6e87c4809f60
BLAKE2b-256 8dedb78d24ff3566cc70211decfd7e10593fc5523d674e81d731b6e1fef9d253

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.0a4 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page