
Calculate Significant Cluster Statistics
Source:R/significant_cluster_stats.R
significant_cluster_stats.RdThis function computes statistics (mean or median) for significant clusters based on the supersubject data and results directories. It retrieves the clusters from an MGH file, extracts relevant measurements for each cluster, and computes either the mean or median for each subject in the supersubject data.
Arguments
- stat
A character string specifying the statistic to compute. Either "mean" or "median".
- ss_dir
A character string indicating the directory containing the super-subject data matrix.
- res_dir
A character string indicating the directory containing the result data, including the stack information and the significant clusters.
- term
A character string indicating the term or "stack name" to find in the stack file.
- measure
A character string indicating the measure used (e.g., "thickness", "volume").
- hemi
A character string indicating the hemisphere. One of "lh" for left hemisphere or "rh" for right hemisphere.