Hi, I am using SAS University Edition. I am trying to overlay a KM curve and PH curve to see if they match relatively well. I can overlay them, but the PH curves have lines connecting the starting point and ending point. Can someone help me remove these lines? proc phreg data=Allhiv33;
class arm;
model (tL,tR)*status(0)=arm;
baseline out=bb covariates=covs survival=s cumhaz=Ht ;
run;
proc lifetest data=allhiv2 outsurv=c ;
time inf_time*delta(0);
strata arm;
run;
data b_new;
set bb;
length Z $27;
if arm="DMPA" then Z="PH DMPA";
if arm="IUD" then Z="PH IUD";
if arm="Jadelle" then Z="PH Jadelle";
run;
data c_new;
set c(rename=(survival=s inf_time=tR));
length Z $27;
if arm="DMPA" then Z="KM DMPA";
if arm="IUD" then Z="KM IUD";
if arm="Jadelle" then Z="KM Jadelle";
run;
data both_arms;
set b_new c_new;
run;
proc sgplot data=both_arms;
series x=tR y=s / group=Z ;
run;
** neither sgplot rids of connecting lines;
proc sgplot data=both_arms;
step y=s x=tR / group=z;
run;
... View more