BookmarkSubscribeRSS Feed
ANKH1
Pyrite | Level 9

This is the code

 

ods output Quartiles= median_ci(where=(percent=50));
proc lifetest data=test;
time duration*censor(1);
strata group;
run;

It runs, but in results for quartile estimates it only shows complete data (point estimate, 95 CI) for the percent 25. There is no point estimate for 50 or 75. For this percents, it only shows the lower CI. Is this something to do with the data? Should I calculate the median and CI with another proc? The median and CI are to describe survival data. Any help is appreciated.

6 REPLIES 6
ballardw
Super User

It appears that to generate the quartiles the METHOD= on the Proc statement should be one of PL B or FH  from the online help Details tab under ODS Table Names . The default is KM when not stated.

ANKH1
Pyrite | Level 9
Thanks for your answer. I tried the different methods but none gave a median quartile.
Rick_SAS
SAS Super FREQ

Check the definition of the CENSOR variable in your data? Is it possible that you should be using CENSOR(0) instead of CENSOR(1) on the TIME statement? If you accidentally switch the 0/1 value, you can get the situation that you describe.

 

ANKH1
Pyrite | Level 9

Thanks for your response. I defined censor=1 to subjects who survived and did not show progression of disease. If I change censor (0) in the code (below) it gives all quartiles. Is this switch ok? I am not sure this is right.

ods output Quartiles= median_ci(where=(percent=50));
proc lifetest data=test;
time duration*censor(0);
strata group;
run;
FreelanceReinh
Jade | Level 19

Hello @ANKH1,

 

Missing quartile point estimates and confidence limits are quite common if the Kaplan-Meier curve and related curves for the confidence limits don't drop far enough -- a data-dependent issue: see explanations in Re: Why did I get confidence intervals without a estimate? (and the PROC LIFETEST documentation page linked there) and Re: Kaplan Meier stats.

 

Also, there was a long standing bug impacting some of those calculations of PROC LIFETEST, which has been fixed only in SAS 9.4M7 (and later releases): see Problem Note 64617: The LIFETEST procedure produces incorrect upper confidence limits for the quarti....

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 6 replies
  • 773 views
  • 3 likes
  • 4 in conversation