https://github.com/rishi-kulkarni/hierarch
Resampling-Based Hypothesis Testing for Python
https://github.com/rishi-kulkarni/hierarch
bootstrapping-statistics hypothesis-tests permutation-statistics resampling-strategies
Last synced: 4 months ago
JSON representation
Resampling-Based Hypothesis Testing for Python
- Host: GitHub
- URL: https://github.com/rishi-kulkarni/hierarch
- Owner: rishi-kulkarni
- License: mit
- Created: 2021-04-13T05:34:04.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2026-01-13T00:04:41.000Z (5 months ago)
- Last Synced: 2026-01-14T11:39:55.230Z (5 months ago)
- Topics: bootstrapping-statistics, hypothesis-tests, permutation-statistics, resampling-strategies
- Language: Python
- Homepage:
- Size: 812 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# hierarch
## A Hierarchical Resampling Package for Python
Version 1.2.0
hierarch is a package for hierarchical resampling (bootstrapping, permutation) of datasets in Python. Because for loops are ultimately intrinsic to cluster-aware resampling, hierarch uses Numba to accelerate many of its key functions.
hierarch has several functions to assist in performing resampling-based (and therefore distribution-free) hypothesis tests, confidence interval calculations, and power analyses on hierarchical data.
## Table of Contents
1. [Introduction](#introduction)
2. [Setup](#setup)
3. [Documentation](#documentation)
4. [Citation](#citation)
## Introduction
Design-based randomization tests represents the platinum standard for significance analyses [[1, 2, 3]](#1) - that is, they produce probability statements that depend only on the experimental design, not at all on less-than-verifiable assumptions about the probability distributions of the data-generating process. Researchers can use hierarch to quickly perform automated design-based randomization tests for experiments with arbitrary levels of hierarchy.
[1] Tukey, J.W. (1993). Tightening the Clinical Trial. Controlled Clinical Trials, 14(4), 266-285.
[2] Millard, S.P., Krause, A. (2001). Applied Statistics in the Pharmaceutical Industry. Springer.
[3] Berger, V.W. (2000). Pros and cons of permutation tests in clinical trials. Statistics in Medicine, 19(10), 1319-1328.
## Setup
### Dependencies
- numpy
- pandas (for importing data)
- numba
- scipy (for power analysis)
### Installation
The easiest way to install hierarch is via PyPi.
`pip install hierarch`
Alternatively, you can install from Anaconda.
`conda install -c rkulk111 hierarch`
## Documentation
Check out our user guide at [readthedocs](https://hierarch.readthedocs.io/).
## Citation
If hierarch helps you analyze your data, please consider citing it. The manuscript also
contains a set of simulations validating hierarchical randomization tests in a variety of
conditions.
Kulkarni RU, Wang CL, Bertozzi CR (2022) Analyzing nested experimental designs—A user-friendly resampling method to determine experimental significance. PLoS Comput Biol 18(5): e1010061. https://doi.org/10.1371/journal.pcbi.1010061