https://github.com/john-veillette/niseq

group sequential tests for neuroimaging

https://github.com/john-veillette/niseq

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary

Keywords

adaptive-design eeg electrocorticography electroencephalography fmri group-sequential-designs magnetoencephalography meeg meg mne-python mri neuroimaging neuroscience nilearn nipy statistics
Last synced: 5 months ago · JSON representation

Repository

group sequential tests for neuroimaging

Basic Info
  • Host: GitHub
  • Owner: john-veillette
  • License: bsd-3-clause
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 934 KB
Statistics
  • Stars: 7
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
adaptive-design eeg electrocorticography electroencephalography fmri group-sequential-designs magnetoencephalography meeg meg mne-python mri neuroimaging neuroscience nilearn nipy statistics
Created over 3 years ago · Last pushed over 2 years ago

https://github.com/john-veillette/niseq/blob/main/

[![Unit Tests](https://github.com/john-veillette/niseq/actions/workflows/pytest.yml/badge.svg)](https://github.com/john-veillette/niseq/actions/workflows/pytest.yml) [![codecov](https://codecov.io/gh/john-veillette/niseq/branch/main/graph/badge.svg?token=Q88ZWUEO7D)](https://codecov.io/gh/john-veillette/niseq) [![DOI](https://zenodo.org/badge/549239051.svg)](https://zenodo.org/badge/latestdoi/549239051) [![Downloads](https://static.pepy.tech/personalized-badge/niseq?period=total&units=international_system&left_color=black&right_color=brightgreen&left_text=PyPI%20downloads)](https://pypi.org/project/niseq/)
# niseq

__For a full description of the permutation-based approach to sequential hypothesis testing implemented in niseq, check out our  [NeuroImage paper](https://doi.org/10.1016/j.neuroimage.2023.120232)!__ (We also appreciate a citation if you use this package in your research.)

`niseq` provides sequential generalizations of common statistical tests used in neuroimaging. That is, you can analyze your data multiple times throughout your experiment and stop data collection when there is enough evidence to reject the null hypothesis [without inflating your false positive rate](https://github.com/john-veillette/niseq/blob/42d77e84195d17aacb56cc7ec63925f7b6e543c7/notebooks/FPR-simulation.ipynb) using an approach called [alpha spending](https://doi.org/10.1002/ejsp.2023).

The alpha spending approach to sequential analysis was first introduced by [Lan and DeMets (1983)](https://doi.org/10.1093/biomet/70.3.659) and has become common practice in clinical trials due to its substantial efficiency advantage over fixed-sample designs (i.e. fewer observations required on average to acheive the same statistical power). However, the original alpha spending approach relies on normality assumptions to derive adjusted significance thresholds, limiting its applicability to statistical tests used in neuroimaging. Our [permutation-based approach](https://doi.org/10.1016/j.neuroimage.2023.120232) to alpha spending relaxes these assumptions, allowing essentially any fixed-sample permutation test (e.g. cluster-based permutation test, threshold-free cluster enhancement, network-based statistic, _t_-max and _F_-max) to be generalized to a sequentially-valid permutation test.

You may be interested in using `niseq` if you want to run a well-powered neuroimaging study and
* don't currently have a good way of estimating the sample size you need for your study a priori. __You can use a sequential stopping rule to determine your final sample size without inflating your false positive rate.__
* do have a good way of estimating a fixed sample size, but would prefer to collect fewer observations if justified by the data. __Sequential designs can acheive the same statistical power as a fixed-sample design using, on average, fewer observations.__
* want to use an adaptive design in case so you can adjust mid-experiment if you've underestimated the needed sample size. __You can conduct a conditional power analysis at an interim look at the data and adjust your design accordingly without inflating your false positive rate.__

## Installation

A stable version can be installed using
```
pip install niseq
```

and the development version using 
```
pip install git+https://github.com/john-veillette/niseq.git
```

## Usage

See our [API documentation](http://niseq.readthedocs.io/) and [example notebooks](https://github.com/john-veillette/niseq/tree/main/notebooks) for usage instructions.

Tutorial notebooks currently include:
* [Sequential cluster-based permutation tests and sequential threshold-free cluster enhancement on EEG data](https://github.com/john-veillette/niseq/blob/main/notebooks/EEG-cluster-and-TFCE-example.ipynb)
* [Sequential cluster-based permutation tests and sequential _t_-max on fMRI data](https://github.com/john-veillette/niseq/blob/main/notebooks/fMRI-cluster-and-tmax-example.ipynb)
* [Sequential network-based statistic for fMRI connectivity data](https://github.com/john-veillette/niseq/blob/main/notebooks/fMRI-NBS-example.ipynb)
* [Power analysis (both a priori & conditional) by bootstrap for fixed-sample, sequential, and adaptive designs](https://github.com/john-veillette/niseq/blob/main/notebooks/power-example.ipynb)

Owner

  • Name: John Veillette
  • Login: john-veillette
  • Kind: user
  • Company: University of Chicago

Doctoral student researching how physiological constraints impose structure on action and perception

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/pytest.yml actions
  • actions/checkout master composite
  • actions/setup-python master composite
  • codecov/codecov-action v2 composite
docs/requirements.txt pypi
  • mne >=1.0
setup.py pypi
  • mne >=1.0