Department of Chemistry, Stanford University, Stanford, California, United States of America.
Stanford ChEM-H, Stanford University, Stanford, California, United States of America.
PLoS Comput Biol. 2022 May 2;18(5):e1010061. doi: 10.1371/journal.pcbi.1010061. eCollection 2022 May.
While hierarchical experimental designs are near-ubiquitous in neuroscience and biomedical research, researchers often do not take the structure of their datasets into account while performing statistical hypothesis tests. Resampling-based methods are a flexible strategy for performing these analyses but are difficult due to the lack of open-source software to automate test construction and execution. To address this, we present Hierarch, a Python package to perform hypothesis tests and compute confidence intervals on hierarchical experimental designs. Using a combination of permutation resampling and bootstrap aggregation, Hierarch can be used to perform hypothesis tests that maintain nominal Type I error rates and generate confidence intervals that maintain the nominal coverage probability without making distributional assumptions about the dataset of interest. Hierarch makes use of the Numba JIT compiler to reduce p-value computation times to under one second for typical datasets in biomedical research. Hierarch also enables researchers to construct user-defined resampling plans that take advantage of Hierarch's Numba-accelerated functions.
虽然层次实验设计在神经科学和生物医学研究中几乎无处不在,但研究人员在进行统计假设检验时,往往没有考虑到他们数据集的结构。基于重采样的方法是执行这些分析的一种灵活策略,但由于缺乏开源软件来自动构建和执行测试,因此这项工作具有一定难度。为了解决这个问题,我们提出了 Hierarch,这是一个用于对层次实验设计执行假设检验和计算置信区间的 Python 包。使用排列重采样和引导聚合的组合,Hierarch 可以用于执行假设检验,这些检验可以保持名义第一类错误率,并生成置信区间,在不假设感兴趣数据集分布的情况下保持名义覆盖率。Hierarch 利用 Numba JIT 编译器将 p 值的计算时间减少到一秒钟以内,对于生物医学研究中的典型数据集来说,这是非常快的。Hierarch 还使研究人员能够构建用户定义的重采样计划,利用 Hierarch 的 Numba 加速函数。