%Plot ROC Curve for Creatinine Kinase and Acute Myocardial Infraction
%Exercise
clear all
close all

 disp('Creatinine Kinase and Acute Myocardial Infraction')
 lw = 2; 
 set(0, 'DefaultAxesFontSize', 15);
 fs = 12;
 msize = 10;



pts=[0,0;1-0.9806, 0.1765;1-0.964, 0.2941;1-0.9304, 0.4314;1-0.6524, 0.549;1,1];
plot(pts(:,1),pts(:,2),'linewidth',lw)
hold on
fill([pts(:,1)', 1, 1, 0],[pts(:,2)', 1, 0, 0],'y')
plot(pts(:,1),pts(:,2),'o',  ...
       'MarkerSize',msize,'MarkerEdgeColor','k',...
       'MarkerFaceColor',[.49 1 .63])  

plot([0, 1],[0,   1],'g--','LineWidth',2) 

text(0.04, 0.18,'481 IU/liter')
text(0.06, 0.28,'361 IU/liter')
text(0.09, 0.40,'241 IU/liter')
text(0.38, 0.52,'121 IU/liter')
xlabel('1 - specificity')
ylabel('sensitivity')   
text('Interpreter','latex',...
	'String','$\fbox{Area =   0.6594}$',...
	'Position',[0.55 .45],...
	'FontSize',17) 


%print -depsc 'C:\Springer\ROC\ROCeps\ckinase.eps' %
auc(pts(:,1),pts(:,2))



