Skip to main content

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
  2. Setup
  3. Documentation
  4. Citation

Introduction

Design-based randomization tests represents the platinum standard for significance analyses [1, 2, 3] - 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.

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

Download files

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

Source Distribution

hierarch-1.2.1.tar.gz (108.3 kB view details)

Uploaded Source

Built Distribution

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

hierarch-1.2.1-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file hierarch-1.2.1.tar.gz.

File metadata

  • Download URL: hierarch-1.2.1.tar.gz
  • Upload date:
  • Size: 108.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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}

File hashes

Hashes for hierarch-1.2.1.tar.gz
Algorithm Hash digest
SHA256 1c634e918c8b348a5a7e4ad9a795165af5c999d8b56b434deda43e714901d7d3
MD5 527967487b86a7163520101c6b62f2a9
BLAKE2b-256 d929898afcce407fbe3c8152b908bf6e62f83575efdca19cd0438e8d4e38a171

See more details on using hashes here.

File details

Details for the file hierarch-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: hierarch-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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}

File hashes

Hashes for hierarch-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 51151557afede9dc68ed7d69b7d61ff0abc5c228664165c8163f3d4e35f96143
MD5 4e043f4fda35398baeb47ddb5f7005d2
BLAKE2b-256 d5483c2b7b9b0abd5824c0b9d908096a3373d22f0f6a77291e4ab4364ee6f93b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 files

1.2.0

2 files

1.1.6

2 files

1.1.5

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

1 file

Supported by

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