As I contemplate the best way to do this with already-made time series in a 1D file, I just want to check—were these created by separately averaging time series within ROIs? If so, you could avoid this intermediate step, and use 3dNetCorr to create the matrix from the ROI map and the EPI time series directly: https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/programs/3dNetCorr_sphx.html
There isn’t a flag to set the diagonals to zero for either the Pearson correlation or Fisher Z-transform output values. I don’t see why it would be necessary, and for Pearson r it should be one on the diagonals (for Fisher Z, it would be infinity, which is hard to store…; 4 is just a cutoff).
There is another reason not to want the diagonals to be uniformly zero: some people have ROIs with no data (e.g., a partial dataset being analyzed with a whole brain set of ROIs). The program by default will complain and not run—it wants to keep users from making an error, where bad alignment or some other mistake produces all-zero time series. But if you use “-push_thru_many_zeros” and “-allow_roi_zeros”, you can get a correlation matrix where the all-zero rows and columns are left in. The only way you can distinguish this outcome from just having tiny correlations is that the diagonal for these “all-zero” time series will then be zero.
Hope that makes sense.
–pt
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.