I have a question and am seeking guidance about using 3dTcorr1D for resting state functional connectivity.
From the 3dTcorr1D help file:
You can extract the time series from a single voxel with given spatial indexes using 3dmaskave, and then run it with 3dTcorr1D:
3dmaskave -quiet -ibox 40 30 20 epi_r1+orig > r1_40_30_20.1D
3dTcorr1D -pearson -Fisher -prefix c_40_30_20 epi_r1+orig r1_40_30_20.1D
When I use 3dmaskave to extract a mean time series from mask (the seed region) in errts.tproject and errts.fanaticor datasets, it also extracts zeros for each censored TR. I suspect that the zeros in the same places of the time series of every voxel inflates the cross-correlations as a function of censored movement. Is this correct?
I am thinking of applying the same movement censor file used to create the errts files in afni_proc.py, but this doesn’t seem to be a 3dTcorr1D option. What do other AFNI users do about this, if anything? I am writing a 3ddeconvolve script to perform the cross correlation with a censor file. Does this make sense? Here is the basic command with generic filenames:
If the correlations are computed with the same data (i.e. all time series are censored the same way, which is probably the case here), then the errts values of zero at censored time points have no impact at all on the correlations (whether they are left in as zeros or censored out). The important point is that zero is exactly the mean of the errts time series, and extending a pair of time series with exactly each mean has no effect on their correlation.
To be clear, one can compute a correlation by:
subtract each time series mean, so the new means are zero
scale each time series to unit length (sum_squares = 1)
correlation = dot product
Correction: variance=1 at step 2 should be just sum squares. The point is that it does not depend on NT, which variance does.
Given this, adding corresponding time points equal to the mean will make them zero after step 1. Therefore they will not affect the sum of squares (adding squared zeros) or the dot product (adding zero times zero for those extra time points). The correlation will be unchanged.
It would indeed matter if the correlations were between different subjects for example, where the censoring differed between the 2 time series. That would be problematic.
Thanks Rick. Very clear and helpful guidance, as usual, and a big relief for our team.
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.