Directional Fragility Diagnostics for EEG Connectivity
Overview
Implements Metric-T, a permutation-based diagnostic that flags when the reported direction of a group difference in electroencephalography (EEG) functional connectivity depends on the choice of metric. Direction consistency (DC) converts the weighted phase lag index (wPLI) and magnitude-squared coherence (MSC), both derived from the same cross-spectrum, into the percentage of channel-pair features for which one group exceeds the other; Metric-T is T = DC(wPLI) - DC(MSC). Significance is assessed by aligned label permutation with marginal and Westfall-Young max-T multiplicity control. For small samples the reference set is enumerated completely: exact two-group tests, the complete two-group labelling space (in which cut-points, exclusions and batches are located on one distribution), and a stratified exact test for a continuous covariate. Core functions use base R only; a 'shiny' graphical interface is included. Method: Kimura (2026) doi:10.1016/j.neuri.2026.100286.
metric_t(exact = TRUE): complete enumeration of two-group label assignments; p-values, attainable minimum p and Westfall-Young adjustment are computed on the complete set.mt_label_space()andmt_locate(): Metric-T for every two-group labelling of the subjects (2^n - 2), with the effective number of independent features and the share of labellings showing a nominal reversal.metric_t_trend(): Metric-T for a continuous covariate, with exact permutation restricted to strata (for example recording sessions) and joint adjustment over several covariates.mt_clean_epochs(): linear detrending and peak-to-peak rejection of epochs.mt_labelset()/mt_labelings(): enumeration of labellings for ambiguous group membership.
From NEWS.md in the release
Install
Health
- OK13 OKNow
- OK7 OK2026-10-17
Documentation
- Help pages
- 23
- Examples that run
- 100%23 run in a plain check (1 of them under a condition)
- Exported functions with examples
- 100%
- Documented parameters
- 84%
- Return-value docs
- 100%
- Help pages citing references
- 4%
Downloads
Repository
1 development-tooling and community-health practice detected across 1 family in the upstream repository
Checks run against github.com/akimura753/metrict on 2026-10-25.
Dependencies
Installing metricT adds no packages beyond those that come with R.
Code & Tests
People & History
- 0.2.0Latest2026-10-16 · current release ·
10 days in CRAN's queue
Listed in CRAN's incoming queue from 2026-10-06 15:36 to 2026-10-16 07:45 UTC, in 45 readings. - RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-10-16
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.0.0
- Download size
- 129 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("metricT")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.