BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
oddsratio
Fluorite | Level 6

Hi. My task is to analyze a very simple and straightforward cancer registry. My output was significantly different after changing the option, even though in my opinion it was just for display purposes. Below I have included both code and their outputs for your reference. Could you please explain what happened and which version is better? I really appreciate your time and help.

 

  • Version one
proc lifetest data=registry atrisk plot=(survival (atrisk=0 to 5 by 1 atrisktickonly)) 
			  outsurv=ci95 maxtime=5 timelist=(0 to 5 by 1) reduceout; 
	time survyr*vital(1); 
	strata rgroup1/ test=all;
	label survyr ='Time in years' rgroup1="race"; 
run;

oddsratio_2-1636360135988.png

 

  • Version two
    • test and outside was added in the first for plot
proc lifetest data=registry atrisk plot=(survival ( test atrisk=0 to 5 by 1 atrisktickonly outside)) 
			  timelist=(0 to 5 by 1) outsurv=ci95 maxtime=5 timelist=(0 to 5 by 1) reduceout; 
	time survyr*vital(1); 
	strata rgroup1/ test=all;
	label survyr ='Time in years' rgroup1="race"; 
run;

oddsratio_1-1636360072202.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @oddsratio,

 

I can reproduce the issue using SASHELP sample data (as in https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_code_liftex2.htm), but only after modifying the template as described in Customizing the Kaplan-Meier Survival Plot. Specifically, I had to set the VIEWMIN= option to 0.5 in order to get a y-axis similar to that in your plots:

%ProvideSurvivalMacros

%let yOptions = linearopts=(viewmin=0.5 viewmax=1);

%CompileSurvivalTemplates

Did you modify the template in a similar way? Using the default viewmin=0 (or a sufficiently small value >0) should resolve the issue.

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hi @oddsratio,

 

I can reproduce the issue using SASHELP sample data (as in https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_code_liftex2.htm), but only after modifying the template as described in Customizing the Kaplan-Meier Survival Plot. Specifically, I had to set the VIEWMIN= option to 0.5 in order to get a y-axis similar to that in your plots:

%ProvideSurvivalMacros

%let yOptions = linearopts=(viewmin=0.5 viewmax=1);

%CompileSurvivalTemplates

Did you modify the template in a similar way? Using the default viewmin=0 (or a sufficiently small value >0) should resolve the issue.

oddsratio
Fluorite | Level 6

Thank you so much for helping me out. You are right! By using the default setting view in=0, the difference was resolved.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 732 views
  • 1 like
  • 2 in conversation