NeuroStat: An Open-Source EEG Connectivity Platform for Randomised Controlled Trials
Usman Ghani, Iftikhar Ahmad, Shahbaz Pervez, Seyed Ebrahim Hosseini, Imran Khan NiaziBackground: Electroencephalographic (EEG) functional connectivity analysis requires multiple signal-processing, source-modelling, and statistical steps that can limit its adoption in clinician-led randomised controlled trials (RCTs). NeuroStat was developed as a prototype research tool to integrate this workflow; formal usability validation with clinician end-users has not yet been conducted. Methods: NeuroStat is an open-source Python/PyQt6 desktop application that integrates automated artefact removal (a Generalised Eigenvalue Decomposition for Artefact Identification [GEDAI] pathway and a traditional Artefact Subspace Reconstruction (ASR)/Independent Component Analysis (ICA)/ICLabel pathway), boundary element model (BEM) source localisation using the Desikan–Killiany atlas (68 cortical regions), Phase Lag Index (PLI) connectivity estimation across five canonical frequency bands, and RCT-oriented statistical analysis. Evaluation separated sensor-space and source-space claims: a sensor-level simulation (repeated across five independent random seeds) tested preprocessing robustness, a repeated source-space simulation tested recovery of a known cortical parcel-pair contrast after forward projection and inverse reconstruction, a PhysioNet benchmark tested posterior Desikan–Killiany alpha PLI in 20 healthy adults, and an illustrative application to 20 sessions from a published chiropractic RCT demonstrated real-world workflow applicability. Results: In the sensor-level simulation benchmark, the Traditional pathway achieved a mean absolute error of 0.168±0.017 PLI units and root mean squared error of 0.219±0.045 (mean ± SD across five independent random seeds) across all artefact conditions. In the source-space simulation, reconstructed alpha PLI for the known bilateral lateral-occipital parcel pair exceeded anterior control edges across 60 repeated condition runs (mean known-control difference = 0.105 PLI units, 95% CI 0.096–0.114; t(59)=22.61, p<0.001). In the PhysioNet source-space benchmark, posterior Desikan–Killiany alpha PLI was higher during eyes-closed than eyes-open rest (Cohen’s d=0.85, p=0.001; 16/20 subjects showing the expected direction) after ICLabel-enabled preprocessing. In the pilot RCT application, all 20 sessions completed processing without manual intervention, with default-mode network alpha PLI showing a pre-to-post change of +0.071 in the intervention group versus +0.015 in the active control group. Conclusions: NeuroStat integrates preprocessing, source-space construction, connectivity estimation, and statistical reporting within a parameter-logged desktop workflow for EEG functional connectivity studies. Current evidence supports initial technical feasibility, sensor-level preprocessing robustness for one pathway in controlled simulations, source-space recovery of a known parcel-level contrast, source-space sensitivity to an expected posterior alpha resting-state contrast, and error-free processing across 20 real RCT sessions in a pilot workflow demonstration. Formal usability testing, test–retest reliability analysis, participant-specific source-model validation, and clinical-population validation remain necessary before clinician-facing or trial-deployment claims can be made.