BookmarkSubscribeRSS Feed
nadra
Calcite | Level 5

Hi all,

I'm using PROC LIFETEST to create a survival plot with number-at-risk printed on the x-axis and the problem is that the number-at-risk labels are printed as 1, 2, etc instead of the full strata format labels, while the strata names are printed as "1: [Label stratum 1]", "2: [Label Stratum 2]"  in legends (with the corresponding labels of each stratum instead of the bracketed text).

I modify the template used to create the plots (Stat.Lifetest.Graphics.ProductLimitSurvival) to force the procedure to always print the full label  by adding CLASSATRISK = Stratum but the numbers 1 and 2 are still printed with the labels !!!

Anyone could help to get only the number-at-risk labels ?!

1 REPLY 1
Reeza
Super User

You need to use a different variable in your classatrisk.

You are on the correct path by changing the template, but I can't recall the exact variable, I think it might be stratumid or something along those lines. Unfortunately I don't have the code I used to do this anymore (new job). I think I did post the solution on here before though.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 679 views
  • 0 likes
  • 2 in conversation