function abcdFinal_reruns %% 5 Reruns % for i = 2:6 % % clearvars -except i; clc % cfg.env.seed.split = i; % % cfg.idf='no_anom_new_common_bmi'; % cfg.dir.project = '/path_to_your_main_project_folder/abcdAll_noA'; % THIS NEEDS CHANGING % cfg.frwork.flag = ['_fair_modeA_pub_noAnom_new_common_bmi_run_' num2str(cfg.env.seed.split)]; % % % cfg.data.block = 1; % cfg.frwork.split.EBcol = 2:3; % % cfg.machine.param.nL1x = 20; % cfg.machine.param.nL1y = 20; % cfg.frwork.split.nin = 5; % cfg.frwork.split.nout = 1; % cfg.frwork.split.propout = 0.2; % cfg.stat.nperm = 2000; %500 for the main analysis, 2000 for the 5 restarts. % cfg.frwork.name='fair'; % %in the fair framework, we have mutually exclusive test sets (nout many and with propout % %proportion) with corresponding training sets (nout many and with the % %remaining subjects). the inner folds are regular CV's with nin many sets. % % % Machine settings % cfg.machine.name = 'spls'; % cfg.machine.metric = {'correl' 'simwx' 'simwy'}; % cfg.machine.param.crit = 'correl+simwxy'; % % % Environment settings % cfg.env.comp = 'cluster'; % % % Deflation settings % cfg.defl.name = 'pls-modeA'; % cfg.defl.crit = 'none'; % cfg.defl.split = 'all'; % % % Statistical inference % cfg.stat.split.crit = 'correl'; % cfg.stat.overall.crit = 'none'; % % % Deconfounding & Preprocessing Order % cfg.data.conf = 1; % cfg.data.X.preproc = {'impute','deconf', 'zscore'}; % cfg.data.Y.preproc = {'impute','deconf', 'zscore'}; % % % Update cfg with defaults % cfg = cfg_defaults(cfg); % % %----- Run analysis % main(cfg); % % end %% Correlation of the ADHD mode in the 4 of the 5 reruns (runs 3-6) with the ADHD mode in the main model % Change the directory to where abcdAll_noA\framework\spls_fair20-5_fair_modeA_pub_noAnom_new_common_bmi\res\level4 is. % In our case this was the ADHD mode. cd('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\level4') load('P.mat') P_main = reshape(P,[11288,2]); ADHD_rerun_levels = ['level4'; 'level5'; 'level4'; 'level4']; for i = 3:6 % Change the directory to where abcdAll_noA\framework\spls_fair20-5_fair_modeA_pub_noAnom_new_common_bmi_run is. cd(['C:\Users\Konstantinos Tsirlis\Dropbox\My Desktop\Mourao - Miranda\ABCD results\abcdAll_noA\framework\spls_fair20-5_fair_modeA_pub_noAnom_new_common_bmi_run_' num2str(i) '\res\' ADHD_rerun_levels(i-2,:)]) load('P.mat') P_level = reshape(P,[11288,2]); for j = 1:2 rerun_correl_table(j,i-1) = corr(P_main(:,j),P_level(:,j)); end end