help > RE: Covariance matrix
Apr 20, 2022  11:04 PM | Alfonso Nieto-Castanon - Boston University
RE: Covariance matrix
Hi Lillian,

Sorry, not directly from the Fisher transformed correlation values. You can get the correlation matrix R from the Fisher-transformed matrix Z by using:

R = tanh(Z); 

but the covariance matrix requires also knowing the variances of those ROI timeseries so that is not possible. You can, of course, re-compute that covariance from the denoised timeseries, for example by reading the "data" variable from the ROI_Subject*_Condition*.mat files in the connproject/results/preprocessing folder, and then simply computing the covariance explicitly using something like:

load ROI_Subject001_Condition001.mat
rois = [10, 11, 12];  % select here the ROIs that you want to include in your analysis (note: only univariate ROIs)
[i,j] = ndgrid(rois);
C = arrayfun(@(i,j)data{i}'*data{j},i,j);

Hope this helps
Alfonso
Originally posted by omaomae:
Hi Alfonso and CONN experts,

Is there a way to obtain the covariance matrix for an ROI-to-ROI connectivity analysis, instead of just the Fisher's transformed correlation coefficients? Thanks!

Best,
Lillian

Threaded View

TitleAuthorDate
omaomae Apr 18, 2022
RE: Covariance matrix
Alfonso Nieto-Castanon Apr 20, 2022