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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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