%% MAIN - Motion parameters correlation with brain and behaviour scores clear; clc % Change the directory to where the main model is, % abcdAll_noA\framework\spls_fair20-5_fair_modeA_pub_noAnom_new_common_bmi\res\. basedir = 'C:\Users\Konstantinos Tsirlis\Dropbox\My Desktop\Mourao - Miranda\ABCD results\abcdAll_noA\framework\spls_fair20-5_fair_modeA_pub_noAnom_new_common_bmi\res\'; % You will need to download the motion vector of the subject list you will % have created. The data here are not real and are shown for illustration % purposes only. You will need to request access to the data from the ABCD % directly. load('C:\Users\Konstantinos Tsirlis\Dropbox\My Desktop\Mourao - Miranda\ABCD results\ABCD Github Repo\motionVector.mat') % load('C:\Users\Konstantinos Tsirlis\Dropbox\My Desktop\Mourao - Miranda\ABCD results\ABCD Github Repo\common_brain_anomalous_ind_6std.mat') % motionVector(brain_anomalous_ind)=[]; cd(basedir) motion_correl = cell(length(dir('level*'))*2,2); j = 1; for i = 1:(length(dir('level*'))) cd(['level' num2str(i)]) load('P.mat') P = reshape(P,[11288,2]); motion_correl{j,1} = ['mode' num2str(i) '_brain']; motion_correl{j,2} = corr(P(:,1),motionVector,'rows','complete'); j = j+1; motion_correl{j,1} = ['mode' num2str(i) '_behaviour']; motion_correl{j,2} = corr(P(:,2),motionVector,'rows','complete'); j = j+1; cd(basedir) end xlswrite([basedir 'motion_correl_main.xlsx'],motion_correl); save('motion_correl_main.mat','motion_correl')