Advertisement
woodsja

AsthmaYoungVsOld.m

Jun 4th, 2020
1,967
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 19.00 KB | None | 0 0
  1. FAScaleRat=55.9686/100;
  2. %str_Data255.meanRBC2TIS
  3. %str_Data255.meanTiss2Gas/FAScaleRat
  4. %str_Data255.meanRBC2Gas/FAScaleRat
  5. %str_Data255.meanDiss2Gas/FAScaleRat
  6.  
  7. %             255,  259, 266, 268, 281, 284, 285, 293, 316, 379, 384, 391
  8. %              0,    0,   0,   0,   0,   0,   0,   0,   0,   1,   0,   0
  9. %              W,    W,   W,   W,   W,   W,   W,   W,   W,   W,   A,   W
  10.  
  11. %             290,  313, 438, 446, 388, 444, 306, 291, 303, 469, 470, 437
  12. %              1,    0,   1,   1,   1,   0,   0,   0,   1,   1,   1,   0
  13. %              W,    W,   W,   W,   AA,  W,   W,   AA,  
  14.  
  15.  
  16. %            538,  282, 292, 371, 476, 499, 520, 522
  17. %             0,    0,   0,   1,   1,   0,   0,   0
  18. %             W,    W,   W,   W,   W,   W,   W,   W
  19.  
  20.  
  21. %            305,  271, 451, 442, 321, 314, 439, 399
  22. %             1,    1,   0,   0,   0,   0,   0,   0
  23. %            API,  W,   W,   W,   W,   W,   W,   W
  24.  
  25. %[p_FE1_Old,h_FE1_Old] = ranksum(Age_Heal_You,Age_Heal_Old)
  26. %[p_R2T_YO,h_R2T_YO] = ranksum(R2T_Heal_You,R2T_Heal_Old)
  27.  
  28. %
  29.  
  30. %            255,  259, 266, 268, 281, 284, 285, 293, 316, 379, 384, 391,
  31. %            379,  384,  387,  391
  32. %Age=23+/-5 yrs
  33. Age_Heal_You=[18,  21,  21,  21,  21,  32,  25,  21,  21,  32,  20,   20];
  34. R2T_Heal_You=[0.27,0.35,0.28,0.27,0.33,0.28,0.32,0.32,0.34,0.38,0.34,0.28];
  35. T2G_Heal_You=[1.34,1.13,1.29,1.25,1.16,1.13,1.01,1.06,1.09,1.21,1.02,1.33];
  36. R2G_Heal_You=[0.36,0.39,0.36,0.34,0.39,0.32,0.33,0.34,0.37,0.46,0.35,0.37];
  37. D2G_Heal_You=[1.55,1.40,1.49,1.44,1.35,1.36,1.29,1.34,1.23,1.49,1.24,1.51];
  38. %Ven_Heal_You=[10, 10,   10,   8,  10,  10,  10,  10,  10,  12, 10.06, 9.9];
  39. Ven_Heal_You=[4,   2,     9,   8,   4,   3,  7,   9,   12,  12, 10.06, 9.9];
  40. FE1_Heal_You=[119, 105, 108,  91,  95,   94,  96,  92,  96,  104,  116, 85];
  41. FVC_Heal_You=[122, 104, 105,  96,  100,  95,  110, 104, 101, 104,  117, 95];
  42. F1V_Heal_You=[101, 100, 102,  94,  94,   99,  87,  88,  94,  102,  99,  88];
  43. F25_Heal_You=[114, 103, 107,  70,  76,   87,  69,  67,  77,  103,  91,  57];
  44. BMI_Heal_You=[24,  24,  23,   21,  18,   25,  22,  22,  18,  22,   23,  30];
  45.  
  46.  
  47. %             na,376_in,275?,  , 316,  na, 293,    ,  281
  48.  
  49. %            290,  313, 438, 446, 388, 444, 306, 291, 303, 469, 470, 437
  50. %Age=24+/-5 yrs
  51. Age_Asth_You=[26,  28,  18,  19,  21,  21,  22,  22,  26,  21,  21,  36];
  52. R2T_Asth_You=[0.51,0.35,0.49,0.41,0.48,0.26,0.33,0.32,0.35,0.57,0.43,0.30];
  53. T2G_Asth_You=[0.61,0.85,1.04,1.42,0.78,1.25,0.83,1.25,0.81,0.90,0.97,1.12];
  54. R2G_Asth_You=[0.31,0.30,0.51,0.58,0.37,0.32,0.27,0.40,0.28,0.52,0.42,0.34];
  55. D2G_Asth_You=[0.79,1.03,1.48,1.82,1.03,1.46,0.96,1.55,0.92,1.27,1.13,1.40];
  56. Ven_Asth_You=[25,  17,  12,  15,  14,  13,  9,   9,   24,  10,  10,   13];
  57. Sev_Asth_You=[2,   2,   3,   4,   3,   4,   3,   4,   4,   4,   3,   3];
  58. DLC_Asth_You=[101, 111, 105, 91,  99,  96,  108, 82,  138, 70,  98,  79];
  59. TLC_Asth_You=[125, 127, 100, 104, 105, 108, 100, 96,  130, 91,  107, 84];
  60. RV_Asth_You= [165, 136, 101, 84,  97,  126, 115, 94,  271, 158, 155, 88];
  61. RTC_Asth_You=[133, 107, 101, 81,  93,  117, 115, 98,  208, 175, 146, 104];
  62. FE1_Asth_You=[80,  100, 96,  105, 71,  75,  71,  67,  77,  59,  96,  74];
  63. FVC_Asth_You=[112, 128, 111, 116, 94,  102, 84,  80,  107, 69,  116, 90];
  64. F1V_Asth_You=[70,  78,  89,  92,  81,  73,  84,  84,  72,  87,  83,  81];
  65. F25_Asth_You=[41,  56,  72,  86,  48,  63,  46,  42,  39,  43,  59,  64];
  66. BMI_Asth_You=[18,  27,  22,  26,  31,  19,  23,  24,  27,  20,  29,  24];
  67.  
  68.  
  69. [p_R2T_You,h_R2T_You] = ranksum(R2T_Heal_You,R2T_Asth_You)
  70. [p_T2G_You,h_T2G_You] = ranksum(T2G_Heal_You,T2G_Asth_You)
  71. [p_R2G_You,h_R2G_You] = ranksum(R2G_Heal_You,R2G_Asth_You)
  72. [p_Ven_You,h_Ven_You] = ranksum(Ven_Heal_You,Ven_Asth_You)
  73.  
  74. % plot out R2T
  75. hh=figure;
  76. set(hh, 'DefaultTextFontSize', 18);
  77. x = [R2T_Heal_You R2T_Asth_You];  % [0.4 0.5 0.1 0.7 0.9];
  78. group = [ones(size(R2T_Heal_You)) ones(size(R2T_Asth_You))+1 ]; % [1 1 1 2 2];
  79. bh=boxplot(x, group, 'labels',{'Normal','Asthma'});
  80.  
  81. set(bh(:,:),'linewidth',3);
  82. hh2 = findobj(gca,'Type','text');
  83. set(hh2,'fontweight','b')
  84.  
  85. %xlabel('Subject','fontsize',22,'fontweight','b')
  86. ylabel('RBC / Tissue','fontsize',22,'fontweight','b')
  87. %title('Healthy','fontsize',22,'fontweight','b')
  88.  
  89. set (gca,'fontsize',18,'fontweight','b');
  90. set(gcf,'Color','white')
  91.  
  92. color = ['b', 'r', 'm', 'y'];
  93. h = findobj(gca,'Tag','Box');
  94.  
  95. title('Age<35','fontsize',22,'fontweight','b')
  96.  
  97. ylim([0.1 0.6])
  98.  
  99. hold on;
  100. plot(ones(size(R2T_Heal_You)), R2T_Heal_You,'k*', 'MarkerSize',10)
  101. hold on;
  102. plot(ones(size(R2T_Asth_You))+1, R2T_Asth_You,'b*', 'MarkerSize',10);
  103.  
  104.  
  105. % plot out R2G
  106. hh=figure;
  107. set(hh, 'DefaultTextFontSize', 18);
  108. x = [R2G_Heal_You R2G_Asth_You];  % [0.4 0.5 0.1 0.7 0.9];
  109. group = [ones(size(R2G_Heal_You)) ones(size(R2G_Asth_You))+1 ]; % [1 1 1 2 2];
  110. bh=boxplot(x, group, 'labels',{'Normal','Asthma'});
  111.  
  112. set(bh(:,:),'linewidth',3);
  113. hh2 = findobj(gca,'Type','text');
  114. set(hh2,'fontweight','b')
  115.  
  116. %xlabel('Subject','fontsize',22,'fontweight','b')
  117. ylabel('RBC / Gas','fontsize',22,'fontweight','b')
  118. %title('Healthy','fontsize',22,'fontweight','b')
  119.  
  120. set (gca,'fontsize',18,'fontweight','b');
  121. set(gcf,'Color','white')
  122.  
  123. color = ['b', 'r', 'm', 'y'];
  124. h = findobj(gca,'Tag','Box');
  125.  
  126. title('Age<35','fontsize',22,'fontweight','b')
  127.  
  128. ylim([0.1 0.6])
  129.  
  130. hold on;
  131. plot(ones(size(R2G_Heal_You)), R2G_Heal_You,'k*', 'MarkerSize',10)
  132. hold on;
  133. plot(ones(size(R2G_Asth_You))+1, R2G_Asth_You,'b*', 'MarkerSize',10);
  134.  
  135. % plot out T2G
  136. hh=figure;
  137. set(hh, 'DefaultTextFontSize', 18);
  138. x = [T2G_Heal_You T2G_Asth_You];  % [0.4 0.5 0.1 0.7 0.9];
  139. group = [ones(size(T2G_Heal_You)) ones(size(T2G_Asth_You))+1 ]; % [1 1 1 2 2];
  140. bh=boxplot(x, group, 'labels',{'Normal','Asthma'});
  141.  
  142. set(bh(:,:),'linewidth',3);
  143. hh2 = findobj(gca,'Type','text');
  144. set(hh2,'fontweight','b')
  145.  
  146. %xlabel('Subject','fontsize',22,'fontweight','b')
  147. ylabel('Tissue/Gas','fontsize',22,'fontweight','b')
  148. %title('Healthy','fontsize',22,'fontweight','b')
  149.  
  150. set (gca,'fontsize',18,'fontweight','b');
  151. set(gcf,'Color','white')
  152.  
  153. color = ['b', 'r', 'm', 'y'];
  154. h = findobj(gca,'Tag','Box');
  155.  
  156. title('Age<35','fontsize',22,'fontweight','b')
  157.  
  158. ylim([0.6 1.5])
  159.  
  160. hold on;
  161. plot(ones(size(T2G_Heal_You)), T2G_Heal_You,'k*', 'MarkerSize',10)
  162. hold on;
  163. plot(ones(size(T2G_Asth_You))+1, T2G_Asth_You,'b*', 'MarkerSize',10);
  164.  
  165. % plot out ventilation
  166. hh=figure;
  167. set(hh, 'DefaultTextFontSize', 18);
  168. x = [Ven_Heal_You Ven_Asth_You];  % [0.4 0.5 0.1 0.7 0.9];
  169. group = [ones(size(Ven_Heal_You)) ones(size(Ven_Asth_You))+1 ]; % [1 1 1 2 2];
  170. bh=boxplot(x, group, 'labels',{'Normal','Asthma'});
  171.  
  172. set(bh(:,:),'linewidth',3);
  173. hh2 = findobj(gca,'Type','text');
  174. set(hh2,'fontweight','b')
  175.  
  176. %xlabel('Subject','fontsize',22,'fontweight','b')
  177. ylabel('Ventilation Defect [%]','fontsize',22,'fontweight','b')
  178. %title('Healthy','fontsize',22,'fontweight','b')
  179.  
  180. set (gca,'fontsize',18,'fontweight','b');
  181. set(gcf,'Color','white')
  182.  
  183. color = ['b', 'r', 'm', 'y'];
  184. h = findobj(gca,'Tag','Box');
  185.  
  186. title('Age<35','fontsize',22,'fontweight','b')
  187.  
  188. ylim([0  60])
  189.  
  190. hold on;
  191. plot(ones(size(Ven_Heal_You)), Ven_Heal_You,'k*', 'MarkerSize',10)
  192. hold on;
  193. plot(ones(size(Ven_Asth_You))+1, Ven_Asth_You,'b*', 'MarkerSize',10);
  194.  
  195.  
  196. %{
  197. %            538,  282, 292, 371, 476, 499, 520,  522,  
  198. %Age=59+/-4 yrs
  199. Age_Heal_Old=[60,  55,  59,  59,  60,  58,  52,   67];
  200. R2T_Heal_Old=[0.23,0.22,0.20,0.28,0.28,0.29,0.34,0.27];
  201. T2G_Heal_Old=[1.18,1.43,1.18,1.01,1.02,1.27,1.05,1.19];
  202. R2G_Heal_Old=[0.26,0.32,0.23,0.28,0.29,0.32,0.33,0.33];
  203. D2G_Heal_Old=[1.31,1.61,1.25,1.08,1.20,1.43,1.31,1.40];
  204. Ven_Heal_Old=[38,  17,  18,  17,  24,  24,  20,   17];
  205. %}
  206. %            528,  282, 292, 371, 476, 499, 520,  522,  
  207. %Age=59+/-4 yrs
  208. Age_Heal_Old=[52,  55,  59,  59,  60,  58,  52,   67];
  209. R2T_Heal_Old=[0.28,0.22,0.20,0.28,0.28,0.29,0.34,0.27];
  210. T2G_Heal_Old=[0.92,1.43,1.18,1.01,1.02,1.27,1.05,1.19];
  211. R2G_Heal_Old=[0.26,0.32,0.23,0.28,0.29,0.32,0.33,0.33];
  212. D2G_Heal_Old=[1.10,1.61,1.25,1.08,1.20,1.43,1.31,1.40];
  213. Ven_Heal_Old=[16,  17,  18,  17,  24,  24,  20,   17];
  214. DLC_Heal_Old=[82, 122, 100,  66,  97,  113, 111,  90];
  215. TLC_Heal_Old=[101,112, 104, 104,  113, 107, 115,  110];
  216. RV_Heal_Old= [84, 109, 100, 100,  96,  93,  106,  114];
  217. RTC_Heal_Old=[83, 97,  96,  78,   85,  87,  92,   104];
  218. FE1_Heal_Old=[103,124, 101, 99,   109, 111, 106,  102];
  219. FVC_Heal_Old=[110, 126, 103, 109, 117, 120, 115,  111];
  220. F1V_Heal_Old=[92,  96,  96,  92,  93,  98,  90,   90];
  221. F25_Heal_Old=[78,  110, 89,  75,  87,  111, 76,   73];
  222. BMI_Heal_Old=[22,  29,  25,  26,  28,  27,  21,   23];
  223.  
  224.  
  225.  
  226. %            305,  271, 451, 442, 321, 314, 439, 399
  227. %Age=58+/-9 yrs
  228. Age_Asth_Old=[45,  53,  69,  59,  49,  57,  60,  72];
  229. R2T_Asth_Old=[0.34,0.20,0.30,0.13,0.42,0.19,0.20,0.23];
  230. T2G_Asth_Old=[1.07,0.97,1.27,1.14,0.80,0.87,1.43,0.93];
  231. R2G_Asth_Old=[0.37,0.19,0.38,0.16,0.33,0.17,0.29,0.22];
  232. D2G_Asth_Old=[1.29,1.06,1.54,1.21,1.03,0.92,1.58,1.01];
  233. Ven_Asth_Old=[18,  39,  18,  17,  45,  60,  30,  55];
  234. Sev_Asth_Old=[1,   2,   2,   4,   4,   4,   4,   4];
  235. DLC_Asth_Old=[77,  80,  104, 82,  110, 76,  98, 82];
  236. TLC_Asth_Old=[97,  132, 108, 85,  108, 124, 96, 135];
  237. RV_Asth_Old= [127, 147, 108, 87,  164, 218, 116, 206];
  238. RTC_Asth_Old=[131, 104, 100, 103, 152, 175, 121, 152];
  239. FE1_Asth_Old=[83,  89,  110, 73,  48,  52,  85,  48];
  240. FVC_Asth_Old=[86,  138, 130, 87,  83,  76,  90,  111];
  241. F1V_Asth_Old=[96,  69,  83,  82,  58,  67,  92,  57];
  242. F25_Asth_Old=[72,  39,  81,  46,  18,  25,  62,  16];
  243. BMI_Asth_Old=[29,  25,  24,  26,  19,  24,  36,  28];
  244.  
  245.  
  246. [p_R2T_Old,h_R2T_Old] = ranksum(R2T_Heal_Old,R2T_Asth_Old)
  247. [p_T2G_Old,h_T2G_Old] = ranksum(T2G_Heal_Old,T2G_Asth_Old)
  248. [p_R2G_Old,h_R2G_Old] = ranksum(R2G_Heal_Old,R2G_Asth_Old)
  249. [p_Ven_Old,h_Ven_Old] = ranksum(Ven_Heal_Old,Ven_Asth_Old)
  250.  
  251.  
  252. % plot out R2T
  253. hh=figure;
  254. set(hh, 'DefaultTextFontSize', 18);
  255. x = [R2T_Heal_Old R2T_Asth_Old];  % [0.4 0.5 0.1 0.7 0.9];
  256. group = [ones(size(R2T_Heal_Old)) ones(size(R2T_Asth_Old))+1 ]; % [1 1 1 2 2];
  257. bh=boxplot(x, group, 'labels',{'Normal','Asthma'});
  258.  
  259. set(bh(:,:),'linewidth',3);
  260. hh2 = findobj(gca,'Type','text');
  261. set(hh2,'fontweight','b')
  262.  
  263. %xlabel('Subject','fontsize',22,'fontweight','b')
  264. ylabel('RBC / Tissue','fontsize',22,'fontweight','b')
  265. %title('Healthy','fontsize',22,'fontweight','b')
  266.  
  267. set (gca,'fontsize',18,'fontweight','b');
  268. set(gcf,'Color','white')
  269.  
  270. color = ['b', 'r', 'm', 'y'];
  271. h = findobj(gca,'Tag','Box');
  272.  
  273. title('Age>45','fontsize',22,'fontweight','b')
  274.  
  275. ylim([0.1 0.6])
  276.  
  277. hold on;
  278. plot(ones(size(R2T_Heal_Old)), R2T_Heal_Old,'k*', 'MarkerSize',10)
  279. hold on;
  280. plot(ones(size(R2T_Asth_Old))+1, R2T_Asth_Old,'b*', 'MarkerSize',10);
  281.  
  282.  
  283. % plot out R2G
  284. hh=figure;
  285. set(hh, 'DefaultTextFontSize', 18);
  286. x = [R2G_Heal_Old R2G_Asth_Old];  % [0.4 0.5 0.1 0.7 0.9];
  287. group = [ones(size(R2G_Heal_Old)) ones(size(R2G_Asth_Old))+1 ]; % [1 1 1 2 2];
  288. bh=boxplot(x, group, 'labels',{'Normal','Asthma'});
  289.  
  290. set(bh(:,:),'linewidth',3);
  291. hh2 = findobj(gca,'Type','text');
  292. set(hh2,'fontweight','b')
  293.  
  294. %xlabel('Subject','fontsize',22,'fontweight','b')
  295. ylabel('RBC / Gas','fontsize',22,'fontweight','b')
  296. %title('Healthy','fontsize',22,'fontweight','b')
  297.  
  298. set (gca,'fontsize',18,'fontweight','b');
  299. set(gcf,'Color','white')
  300.  
  301. color = ['b', 'r', 'm', 'y'];
  302. h = findobj(gca,'Tag','Box');
  303.  
  304. title('Age>45','fontsize',22,'fontweight','b')
  305.  
  306. ylim([0.1 0.6])
  307.  
  308. hold on;
  309. plot(ones(size(R2G_Heal_Old)), R2G_Heal_Old,'k*', 'MarkerSize',10)
  310. hold on;
  311. plot(ones(size(R2G_Asth_Old))+1, R2G_Asth_Old,'b*', 'MarkerSize',10);
  312.  
  313. % plot out T2G
  314. hh=figure;
  315. set(hh, 'DefaultTextFontSize', 18);
  316. x = [T2G_Heal_Old T2G_Asth_Old];  % [0.4 0.5 0.1 0.7 0.9];
  317. group = [ones(size(T2G_Heal_Old)) ones(size(T2G_Asth_Old))+1 ]; % [1 1 1 2 2];
  318. bh=boxplot(x, group, 'labels',{'Normal','Asthma'});
  319.  
  320. set(bh(:,:),'linewidth',3);
  321. hh2 = findobj(gca,'Type','text');
  322. set(hh2,'fontweight','b')
  323.  
  324. %xlabel('Subject','fontsize',22,'fontweight','b')
  325. ylabel('Tissue/Gas','fontsize',22,'fontweight','b')
  326. %title('Healthy','fontsize',22,'fontweight','b')
  327.  
  328. set (gca,'fontsize',18,'fontweight','b');
  329. set(gcf,'Color','white')
  330.  
  331. color = ['b', 'r', 'm', 'y'];
  332. h = findobj(gca,'Tag','Box');
  333.  
  334. title('Age>45','fontsize',22,'fontweight','b')
  335.  
  336. ylim([0.6 1.5])
  337.  
  338. hold on;
  339. plot(ones(size(T2G_Heal_Old)), T2G_Heal_Old,'k*', 'MarkerSize',10)
  340. hold on;
  341. plot(ones(size(T2G_Asth_Old))+1, T2G_Asth_Old,'b*', 'MarkerSize',10);
  342.  
  343.  
  344. % plot out ventilation
  345. hh=figure;
  346. set(hh, 'DefaultTextFontSize', 18);
  347. x = [Ven_Heal_Old Ven_Asth_Old];  % [0.4 0.5 0.1 0.7 0.9];
  348. group = [ones(size(Ven_Heal_Old)) ones(size(Ven_Asth_Old))+1 ]; % [1 1 1 2 2];
  349. bh=boxplot(x, group, 'labels',{'Normal','Asthma'});
  350.  
  351. set(bh(:,:),'linewidth',3);
  352. hh2 = findobj(gca,'Type','text');
  353. set(hh2,'fontweight','b')
  354.  
  355. %xlabel('Subject','fontsize',22,'fontweight','b')
  356. ylabel('Ventilation Defect [%]','fontsize',22,'fontweight','b')
  357. %title('Healthy','fontsize',22,'fontweight','b')
  358.  
  359. set (gca,'fontsize',18,'fontweight','b');
  360. set(gcf,'Color','white')
  361.  
  362. color = ['b', 'r', 'm', 'y'];
  363. h = findobj(gca,'Tag','Box');
  364.  
  365. title('Age>45','fontsize',22,'fontweight','b')
  366.  
  367. ylim([0  60])
  368.  
  369. hold on;
  370. plot(ones(size(Ven_Heal_Old)), Ven_Heal_Old,'k*', 'MarkerSize',10)
  371. hold on;
  372. plot(ones(size(Ven_Asth_Old))+1, Ven_Asth_Old,'b*', 'MarkerSize',10);
  373.  
  374. %R2T
  375. [R_tlc_r2t, P_tlc_r2t]= corrcoef([R2T_Asth_You,R2T_Asth_Old], [TLC_Asth_You,TLC_Asth_Old])
  376. [R_rv_r2t, P_rv_r2t]= corrcoef([R2T_Asth_You,R2T_Asth_Old], [RV_Asth_You,RV_Asth_Old])
  377. [R_dlco_r2t, P_dlco_r2t]= corrcoef([R2T_Asth_You,R2T_Asth_Old], [DLC_Asth_You,DLC_Asth_Old])
  378. [R_sev_r2t, P_sev_r2t]= corrcoef([R2T_Asth_You,R2T_Asth_Old], [Sev_Asth_You,Sev_Asth_Old])
  379. [R_rtc_r2t, P_rtc_r2t]= corrcoef([R2T_Asth_You,R2T_Asth_Old], [RTC_Asth_You,RTC_Asth_Old])
  380. [R_fe1_r2t, P_fe1_r2t]= corrcoef([R2T_Asth_You,R2T_Asth_Old], [FE1_Asth_You,FE1_Asth_Old])
  381. [R_fvc_r2t, P_fvc_r2t]= corrcoef([R2T_Asth_You,R2T_Asth_Old], [FVC_Asth_You,FVC_Asth_Old])
  382. [R_f1v_r2t, P_f1v_r2t]= corrcoef([R2T_Asth_You,R2T_Asth_Old], [F1V_Asth_You,F1V_Asth_Old])
  383. [R_f25_r2t, P_f25_r2t]= corrcoef([R2T_Asth_You,R2T_Asth_Old], [F25_Asth_You,F25_Asth_Old])
  384. [R_ven_r2t, P_ven_r2t]= corrcoef([R2T_Asth_You,R2T_Asth_Old], [Ven_Asth_You,Ven_Asth_Old])
  385.  
  386.  
  387.  
  388.  
  389. %T2G
  390. [R_tlc_t2g, P_tlc_t2g]= corrcoef([T2G_Asth_You,T2G_Asth_Old], [TLC_Asth_You,TLC_Asth_Old])
  391. [R_rv_t2g, P_rv_t2g]= corrcoef([T2G_Asth_You,T2G_Asth_Old], [RV_Asth_You,RV_Asth_Old])
  392. [R_dlco_t2g, P_dlco_t2g]= corrcoef([T2G_Asth_You,T2G_Asth_Old], [DLC_Asth_You,DLC_Asth_Old])
  393. [R_sev_t2g, P_sev_t2g]= corrcoef([T2G_Asth_You,T2G_Asth_Old], [Sev_Asth_You,Sev_Asth_Old])
  394. [R_rtc_t2g, P_rtc_t2g]= corrcoef([T2G_Asth_You,T2G_Asth_Old], [RTC_Asth_You,RTC_Asth_Old])
  395. [R_fe1_t2g, P_fe1_t2g]= corrcoef([T2G_Asth_You,T2G_Asth_Old], [FE1_Asth_You,FE1_Asth_Old])
  396. [R_fvc_t2g, P_fvc_t2g]= corrcoef([T2G_Asth_You,T2G_Asth_Old], [FVC_Asth_You,FVC_Asth_Old])
  397. [R_f1v_t2g, P_f1v_t2g]= corrcoef([T2G_Asth_You,T2G_Asth_Old], [F1V_Asth_You,F1V_Asth_Old])
  398. [R_f25_t2g, P_f25_t2g]= corrcoef([T2G_Asth_You,T2G_Asth_Old], [F25_Asth_You,F25_Asth_Old]);
  399. [R_ven_t2g, P_ven_t2g]= corrcoef([T2G_Asth_You,T2G_Asth_Old], [Ven_Asth_You,Ven_Asth_Old])
  400.  
  401. %R2G
  402. [R_tlc_r2g, P_tlc_r2g]= corrcoef([R2G_Asth_You,R2G_Asth_Old], [TLC_Asth_You,TLC_Asth_Old])
  403. [R_rv_r2g, P_rv_r2g]= corrcoef([R2G_Asth_You,R2G_Asth_Old], [RV_Asth_You,RV_Asth_Old])
  404. [R_dlco_r2g, P_dlco_r2g]= corrcoef([R2G_Asth_You,R2G_Asth_Old], [DLC_Asth_You,DLC_Asth_Old])
  405. [R_sev_r2g, P_sev_r2g] = corrcoef([R2G_Asth_You,R2G_Asth_Old], [Sev_Asth_You,Sev_Asth_Old])
  406. [R_rtc_r2g, P_rtc_r2g]= corrcoef([R2G_Asth_You,R2G_Asth_Old], [RTC_Asth_You,RTC_Asth_Old])
  407. [R_fe1_r2g, P_fe1_r2g]= corrcoef([R2G_Asth_You,R2G_Asth_Old], [FE1_Asth_You,FE1_Asth_Old])
  408. [R_fvc_r2g, P_fvc_r2g]= corrcoef([R2G_Asth_You,R2G_Asth_Old], [FVC_Asth_You,FVC_Asth_Old])
  409. [R_f1v_r2g, P_f1v_r2g]= corrcoef([R2G_Asth_You,R2G_Asth_Old], [F1V_Asth_You,F1V_Asth_Old])
  410. [R_f25_r2g, P_f25_r2g]= corrcoef([R2G_Asth_You,R2G_Asth_Old], [F25_Asth_You,F25_Asth_Old])
  411. [R_ven_r2g, P_ven_r2g]= corrcoef([R2G_Asth_You,R2G_Asth_Old], [Ven_Asth_You,Ven_Asth_Old])
  412.  
  413.  
  414. %ventilation
  415. [R_tlc_vent, P_tlc_vent]= corrcoef([Ven_Asth_You,Ven_Asth_Old], [TLC_Asth_You,TLC_Asth_Old])
  416. [R_rv_vent, P_rv_vent]= corrcoef([Ven_Asth_You,Ven_Asth_Old], [RV_Asth_You,RV_Asth_Old])
  417. [R_dlco_vent, P_dlco_vent]= corrcoef([Ven_Asth_You,Ven_Asth_Old], [DLC_Asth_You,DLC_Asth_Old])
  418. [R_sev_vent, P_sev_vent] = corrcoef([Ven_Asth_You,Ven_Asth_Old], [Sev_Asth_You,Sev_Asth_Old])
  419. [R_t2g_vent, P_t2g_vent] = corrcoef([Ven_Asth_You,Ven_Asth_Old], [T2G_Asth_You,T2G_Asth_Old])
  420. [R_r2t_vent, P_r2t_vent] = corrcoef([Ven_Asth_You,Ven_Asth_Old], [R2T_Asth_You,R2T_Asth_Old])
  421. [R_rtc_vent, P_rtc_vent]= corrcoef([Ven_Asth_You,Ven_Asth_Old], [RTC_Asth_You,RTC_Asth_Old])
  422. [R_fe1_vent, P_fe1_vent]= corrcoef([Ven_Asth_You,Ven_Asth_Old], [FE1_Asth_You,FE1_Asth_Old])
  423. [R_fvc_vent, P_fvc_vent]= corrcoef([Ven_Asth_You,Ven_Asth_Old], [FVC_Asth_You,FVC_Asth_Old])
  424. [R_f1v_vent, P_f1v_vent]= corrcoef([Ven_Asth_You,Ven_Asth_Old], [F1V_Asth_You,F1V_Asth_Old])
  425. [R_f25_vent, P_f25_vent]= corrcoef([Ven_Asth_You,Ven_Asth_Old], [F25_Asth_You,F25_Asth_Old])
  426.  
  427.  
  428.    
  429.  
  430.  
  431.  
  432. %correlation
  433. figure
  434. plot([RV_Asth_You], [T2G_Asth_You],'sg', 'Linewidth',3,'MarkerSize',12');
  435. hold on;
  436. plot([RV_Asth_Old],[T2G_Asth_Old], 'db', 'Linewidth',3,'MarkerSize',12');
  437.  
  438. xlabel('RV %pred','fontsize',22,'fontweight','b')
  439. ylabel('Tissue/Gas Ratio [%]','fontsize',22,'fontweight','b')
  440. %title('Healthy','fontsize',22,'fontweight','b')
  441.  
  442. set (gca,'fontsize',18,'fontweight','b');
  443. set(gcf,'Color','white')
  444.  %axis([1.5 7e0 0.05 0.6])
  445.  
  446. p = polyfit([RV_Asth_You,RV_Asth_Old],[T2G_Asth_You,T2G_Asth_Old],1);  
  447. x = [75:300];
  448. f=polyval(p,x) ;
  449. hold on;
  450. plot(x,f,'LineWidth', 2)
  451.  
  452. lh=legend( 'Younger', 'Older','Fitted', 'Location','NorthWest'   );
  453. set( lh, 'fontsize', 18, 'fontweight','b');
  454. M = findobj(lh,'type','line');
  455. set(M,'linewidth',3) % this will also work on a vector of handles
  456.  
  457.  
  458. %correlation
  459. figure
  460. plot([Ven_Asth_You], [R2T_Asth_You],'sg', 'Linewidth',3,'MarkerSize',12');
  461. hold on;
  462. plot([Ven_Asth_Old],[R2T_Asth_Old], 'db', 'Linewidth',3,'MarkerSize',12');
  463.  
  464. xlabel('Vent Def %','fontsize',22,'fontweight','b')
  465. ylabel('RBC/Tissue Ratio','fontsize',22,'fontweight','b')
  466. %title('Healthy','fontsize',22,'fontweight','b')
  467.  
  468. set (gca,'fontsize',18,'fontweight','b');
  469. set(gcf,'Color','white')
  470.  %axis([1.5 7e0 0.05 0.6])
  471.  
  472. p = polyfit([Ven_Asth_You,Ven_Asth_Old],[R2T_Asth_You,R2T_Asth_Old],1);  
  473. x = [0:80];
  474. f=polyval(p,x) ;
  475. hold on;
  476. plot(x,f,'LineWidth', 2)
  477.  
  478. lh=legend( 'Younger', 'Older','Fitted', 'Location','NorthWest'   );
  479. set( lh, 'fontsize', 18, 'fontweight','b');
  480. M = findobj(lh,'type','line');
  481. set(M,'linewidth',3) % this will also work on a vector of handles
  482.  
  483. %healthy vs old
  484. [p_FE1_YO,h_FE1_YO] = ranksum(FE1_Asth_You,FE1_Asth_Old)
  485. [p_FVC_YO,h_FVC_YO] = ranksum(FVC_Asth_You,FVC_Asth_Old)
  486. [p_F1V_YO,h_F1V_YO] = ranksum(F1V_Asth_You,F1V_Asth_Old)
  487. [p_F25_YO,h_F25_YO] = ranksum(F25_Asth_You,F25_Asth_Old)
  488. [p_DLC_YO,h_DLC_YO] = ranksum(DLC_Asth_You,DLC_Asth_Old)
  489. [p_TLC_YO,h_TLC_YO] = ranksum(TLC_Asth_You,TLC_Asth_Old)
  490. [p_RV_YO,h_RV_YO] = ranksum(RV_Asth_You,RV_Asth_Old)
  491. [p_RTC_YO,h_RTC_YO] = ranksum(RTC_Asth_You,RTC_Asth_Old)
  492.  
  493. [p_Ven_YO,h_Ven_YO] = ranksum(Ven_Asth_You,Ven_Asth_Old)
  494. [p_R2T_YO,h_R2T_YO] = ranksum(R2T_Asth_You,R2T_Asth_Old)
  495. [p_T2G_YO,h_T2G_YO] = ranksum(T2G_Asth_You,T2G_Asth_Old)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement