ddmra.analysis.scrubbing_analysis

scrubbing_analysis(qc_values, group_timeseries, edge_sorting_idx, qc_thresh=0.2, perm=True)[source]

Perform Power scrubbing analysis.

Note that correlations from scrubbed timeseries are subtracted from correlations from unscrubbed timeseries, which is the opposite to the original Power method. This reverses the signs of the results, but makes inference similar to that of the QCRSFC and high-low motion analyses.

Parameters
  • qc_values ((N,) list) – List of (T,) arrays

  • group_timeseries ((N,) list) – List of (T, R) arrays

  • edge_sorting_idx (numpy.ndarray of shape (n_edges,)) – Sorting index for upper triangle (not including self-self edges) of correlation matrix. This will sort the 1D array by ascending physical distance of the ROI-ROI pairs.

  • qc_thresh (float) – Threshold to apply to QC values for identifying bad volumes.

  • perm (bool) – Whether the call is part of the null distribution permutations or for the real deal.

Returns

mean_delta_r (numpy.ndarray) – Average (across subjects) change in correlation coefficient from unscrubbed to scrubbed timeseries for each pair of ROIs. Length of array will be ((R * R) - R) / 2 (upper triangle of RxR correlation matrix).

Notes

The basic process for the scrubbing analysis is:

  1. Exclude any subjects with more than 50% excluded volumes or 0% excluded volumes.

  2. For each subject, correlate each ROI’s time series with every other ROI’s time series to produce standard correlation matrix.

  3. Apply QC metric threshold to “scrub” (i.e., remove bad volumes) time series, then compute scrubbing correlation matrix.

  4. Select the upper triangle (minus the diagonal) from the standard and scrubbing correlation matrices, flattening them both to 1D.

  5. Fisher’s z-transform all correlation coefficients from both the standard and scrubbing vectors. WARNING The Power et al. version does not do this.

  6. Subtract the scrubbing z-values from the standard z-values. WARNING This is the opposite of how Power et al. did this!

  7. Average the difference values across participants.