Wednesday, March 13, 2019

Add shade to Kaplan Meier plot

data km;
  seed=12345;
  do loc=1 to 2;
    do time=2 to 22 by 1+int(4*ranuni(seed));
      status=int(2*ranuni(seed));
      output;
    end;
  end;
run;

proc lifetest data=km plots=s outsurv=os;
  ods select survivalplot;
  time time*status(1);
  strata loc;
run;

data os;
  retain survhold 1;
  set os;
  if _censor_ = 1 then  SURVIVAL= survhold;
  else survhold= SURVIVAL;
run;

proc sgplot data=os;
  step x=time y=Survival / name="survival" legendlabel="Survival" group=stratum;
  band x=time lower=0 upper=survival / modelname="survival" transparency=.5;
run;

1 comment:

Anonymous said...

Sega Genesis and Game Gear Video Game Consoles - VGCI.CC
Check out the video game versions for Sega Genesis, Game Gear, Sega Saturn, Atari ST, Master System, Game Boy Color, Genesis, Master youtube mp3 System, Game Gear,