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

Metadata

Release files for mcartest 0.0.0a4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcartest 0.0.0a4
File Size Uploaded Provenance
mcartest-0.0.0a4.tar.gz 16.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcartest 0.0.0a4
File Interpreter ABI Platform
mcartest-0.0.0a4-py3-none-any.whl Python 3 none any Details

Total release size: 32.1 kB

Release files / mcartest-0.0.0a4.tar.gz

Download URL mcartest-0.0.0a4.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
580b757fe72e182e5c7f75af69828510755333b856735b303c0a6aabc33c03a5
BLAKE2b-256 checksum
How to use checksums
54c668e315e6a6640f0b9aa66180a2bfb9b22535252c569cd35e05e6b9da00f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / mcartest-0.0.0a4-py3-none-any.whl

Download URL mcartest-0.0.0a4-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
feacb906b06c87ce3a45308fbd7f6d17ce56f08de91461e502983f4289ac3ee5
BLAKE2b-256 checksum
How to use checksums
8dedb78d24ff3566cc70211decfd7e10593fc5523d674e81d731b6e1fef9d253
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for mcartest 0.0.0a4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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