Data visualization with SAS programming

Kaplan Meier - proc Lifetest in black and white

Accepted Solution Solved
Reply
Regular Contributor
Posts: 163
Accepted Solution

Kaplan Meier - proc Lifetest in black and white

Hi all

I wonder if anyone pease can help me with this code, I am trying to get the Kaplan Meier curves in black/white but not able to do it. Tired style=journal but it didnt work..

Any suggestions please


data _null_;
   %let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/131;
   infile "http:&url/templft.html" device=url;
   file 'macros.tmp';
   retain pre 0;
   input;
   if index(_infile_, '</pre>') then pre = 0;
   if pre then put _infile_;
   if index(_infile_, '<pre>')  then pre = 1;
run;

%inc 'macros.tmp' / nosource;
proc template;
     delete Stat.Lifetest.Graphics.ProductLimitSurvival  / store=sasuser.templat;
     delete Stat.Lifetest.Graphics.ProductLimitSurvival2 / store=sasuser.templat;
run;
%ProvideSurvivalMacros

%let StepOpts = lineattrs=(thickness=1.5 );
%let TitleText0 = "Kaplan Meier curve ";    
%let TitleText1 = &titletext0 " FOOOOR " STRATUMID;
%let TitleText2 = &titletext0;
%let yOptions = label="Proportion" linearopts=(viewmin=0 viewmax=1.0);
%let xOptions = label="Years" offsetmin=.0;
%let LegendOpts = title="Histopathology" location=inside autoalign=(Bottom);
%let InsetOpts  = autoalign=(TOPRIGHT BOTTOMRIGHT TOP BOTTOM) border=true BackgroundColor=GraphWalls:Color Opaque=true;

  %CompileSurvivalTemplates

  ods rtf file='c:\Users\Ta\Desktop\PSC KM.doc' style=journal;

ods listing GPATH = 'c:\g' image_dpi = 400;
ods graphics / reset width=7in height=6in imagename='KM';
ods html sge=on;
ods select lifetest.survivalplot;
proc lifetest data=p atrisk plots=survival(/*atrisk (atrisktickonly outside)*/ test /*cb*/ ) notable;
strata pad;
time ltx_fu*death(0);
run;


ods rtf close;


ods select all;
ods listing close;
ods graphics / reset;
ods rtf close;

Any help is appreciated

kind regards


Accepted Solutions
Solution
‎01-27-2017 06:39 AM
Regular Contributor
Posts: 163

Re: Kaplan Meier - proc Lifetest in black and white

Solved using:

 

%let GraphOpts = attrpriority=none  DataContrastColors=(black) DataColors=( black);

View solution in original post


All Replies
Solution
‎01-27-2017 06:39 AM
Regular Contributor
Posts: 163

Re: Kaplan Meier - proc Lifetest in black and white

Solved using:

 

%let GraphOpts = attrpriority=none  DataContrastColors=(black) DataColors=( black);
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 284 views
  • 1 like
  • 1 in conversation