BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Skyez
Calcite | Level 5

Hi there,

 

I have been struggling with this problem for a while.

 

I run the PROC LIFETEST procedure below to get the KM plot. See the plot in the attachement. However, you will find that the time points along the x-axis are 0, 2.5, 5, 7.5, 9, and 12.5. But I want the time interval to be 3, which can made the time points to be 0,3, 6, 9, 12 and 15 so that the time points along x-axis is same as the time points for the number of at risk listing...I tried many options, even trying to revise PROC TEMPLATE. But none of them works......Does any one have resolved similar problem? Thanks in advance.

 

ods output Survivalplot = SurvivalPlotData;
ods graphics on;
proc lifetest data=adtte1 plots=survival(atrisk=0 to 15 by 3);
time aval*cnsr(1);
strata trtp/test=logrank adjust=sidak;
run;
ods graphics off;

Skyez_0-1689715351716.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19

ATRISK <(options)> <=number-list> displays the numbers of subjects at risk at the given times. You can specify the following options: ATRISKTICK ATRISKLABEL guarantees that tick values are shown on the time axis for those times when the numbers of subjects at risk are displayed. If this option is not specified, you might not be able to tell at exactly which times the number of subjects at risk are displayed. If the ATRISKTICKONLY option is also specified, it takes precedence over the ATRISKTICK option. ATRISKTICKONLY specifies that tick values on the time axis be shown only at the times that are given in the ATRISK= list. If the ATRISKTICK option is also specified, it is ignored; that is, ATRISKTICKONLY takes precedence over ATRISKTICK.

View solution in original post

2 REPLIES 2
data_null__
Jade | Level 19

ATRISK <(options)> <=number-list> displays the numbers of subjects at risk at the given times. You can specify the following options: ATRISKTICK ATRISKLABEL guarantees that tick values are shown on the time axis for those times when the numbers of subjects at risk are displayed. If this option is not specified, you might not be able to tell at exactly which times the number of subjects at risk are displayed. If the ATRISKTICKONLY option is also specified, it takes precedence over the ATRISKTICK option. ATRISKTICKONLY specifies that tick values on the time axis be shown only at the times that are given in the ATRISK= list. If the ATRISKTICK option is also specified, it is ignored; that is, ATRISKTICKONLY takes precedence over ATRISKTICK.

Skyez
Calcite | Level 5
It worked, thanks!!

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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