Singh2020 / scripts /Figure_1C_Clinical_Corr_Plots.m
jalauer's picture
Add files using upload-large-folder tool
03a0748 verified
%% Correlation Analysis with Motor to Cognitive Scores
close all; clc; clear;
cwd = pwd;
addpath(cwd);
% % load clinical scores for correlation analysis
[~, ~, groupInfo] = xlsread([ cwd '\Patients_MS.xlsx'],'All_Corr');
groupDATA = cell2mat(groupInfo(2:end,1:end) );
variables = groupInfo(1,:)' ;
% % % correlation Type
corrType = 'Spearman';
DD = groupDATA(:,3);
UPDRSIII = groupDATA(:,4) ;
FOG = groupDATA(:,5);
MOCA = groupDATA(:,6);
%% Correlation only with FOG Scores: Figure 2A and 2B
figure('rend','painters','pos',[10 10 1200 400]);
% with UPDRS III
subplot(131); SS = plot( FOG, UPDRSIII, 'k+');hold on;
[R,P] = corr( FOG, UPDRSIII,'type',corrType); set(SS, 'MarkerSize', 8, 'LineWidth', 2); l = lsline ; set(l,'LineWidth', 2); hold off;
ylabel('UPDRS III', 'FontSize', 10); set(gca, 'FontSize', 10, 'YMinorTick','on','XMinorTick','on'); xlabel('FOG Score', 'FontSize', 10);
title(['\color{black} R=' num2str(R,'%10.3f'),'; P=' num2str(P,'%10.3f')]); clear SS R P l; xlim([min(FOG)-1 max(FOG)+1]);
% % with MOCA
subplot(132); SS = plot( FOG, MOCA, 'k+');hold on;
[R,P] = corr( FOG, MOCA,'type',corrType); set(SS, 'MarkerSize', 8, 'LineWidth', 2); l = lsline ; set(l,'LineWidth', 2); hold off;
ylabel('MOCA Score', 'FontSize', 10); set(gca, 'FontSize', 10, 'YMinorTick','on','XMinorTick','on'); xlabel('FOG Score', 'FontSize', 10);
title(['\color{black} R=' num2str(R,'%10.3f'),'; P=' num2str(P,'%10.3f')]); clear SS R P l; xlim([min(FOG)-1 max(FOG)+1]); ylim([0 30]);
% % with MOCA
subplot(133); SS = plot( FOG, DD, 'k+');hold on;
[R,P] = corr( FOG, DD,'type',corrType); set(SS, 'MarkerSize', 8, 'LineWidth', 2); l = lsline ; set(l,'LineWidth', 2); hold off;
set(gca, 'FontSize', 10, 'YMinorTick','on','XMinorTick','on');
title(['\color{black} R=' num2str(R,'%10.3f'),'; P=' num2str(P,'%10.3f')]); clear SS R P l;
ylabel('Disease duration (years)');
xlabel('FOG Score'); xlim([min(FOG)-1 max(FOG)+1]); ylim([0 15]);
suptitle('Figure 1C');
%%%%%%%%%%%%%%% results related to manuscripts %%%%%%%%%%%%%%%%%%%%%%%%%%
figure; SS = plot( MOCA, DD, 'k+');hold on;
[R,P] = corr( MOCA, DD,'type',corrType); set(SS, 'MarkerSize', 8, 'LineWidth', 2); l = lsline ; set(l,'LineWidth', 2); hold off;
set(gca, 'FontSize', 10, 'YMinorTick','on','XMinorTick','on');
title(['\color{black} R=' num2str(R,'%10.3f'),'; P=' num2str(P,'%10.3f')]); clear SS R P l;
ylabel('Disease duration (years)');
xlabel('MOCA Score'); ylim([0 15]);
%% %%% Statistics: partial correlation between 2 variables while 3rd one is control: Linear or rank partial correlation coefficients
%%%%%%% 3 factors only: with DD
patcor2 = [DD FOG MOCA];
[rho2,pval2] = partialcorr(patcor2, 'type',corrType);
rho2 = array2table(rho2, 'VariableNames',{'DD','FOG','MOCA'}, 'RowNames',{'DD','FOG','MOCA'});
pval2 = array2table(pval2, 'VariableNames',{'DD','FOG','MOCA'}, 'RowNames',{'DD','FOG','MOCA'});