How to compute Intraclass Correlation Coefficient (ICC ) between two adjacency (functional connectivity) matrices?
108 views (last 30 days)
Show older comments
Hi,
I have two adjacency matrices (adj.RS1 & adjRS2) computed as an output of functional connectivity analysis of a test-retest dataset from CONN toolbox. I would like to compute and plot the Intraclass Correlation Coefficient (ICC) to assess test-retest reliability between these two adjacency matrices. Could anyone guide how can I conduct the ICC analysis? Matrices are as given below in the screenshots (matrix 1=adjRS1).
Thanks for your help.
0 Comments
Answers (1)
Jacob Mathew
on 2 Apr 2024
To compute the ICC between 2 matrices, you can utilise the ICC Add On from the “Add On Explorer” in MATLAB. You can find it in the “Home” tab mentioned as “Add-Ons”.
You can find out more about it in the file exchange link below:
A simple demo code demonstrating its usage is as follows:
% Setting Seed
rng(1);
% Generate sample data for adjRS1 and adjRS2
adjRS1 = rand(4, 4, 3); % Random numbers between 0 and 1
adjRS2 = rand(4, 4, 3); % Different set of random numbers
% Ensuring the matrices are symmetric and have zeros on the diagonal
for i = 1:3 % Loop through each subject
for j = 1:4 % Loop through each ROI
adjRS1(j, j, i) = 0;
adjRS2(j, j, i) = 0;
for k = j+1:4
adjRS1(k, j, i) = adjRS1(j, k, i);
adjRS2(k, j, i) = adjRS2(j, k, i);
end
end
end
% Concatenating the data
combinedData = cat(4, adjRS1, adjRS2);
% Reshaping it into 2D based on the subjects
data2D = reshape(combinedData, 4*4, 3*2);
% Calculating the ICC
[r, LB, UB, F, df1, df2, p] = ICC(data2D, '1-1')
The output of the above code is as follows:
0 Comments
See Also
Categories
Find more on Scatter Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!