Programming the statistical procedures from SAS

No survival plot in PROC LIFETEST.

Reply
Contributor n6
Contributor
Posts: 62

No survival plot in PROC LIFETEST.

'm doing a simple PROC LIFETEST. If I don't do ODS GRAPHICS ON; then I get the K-M survival plot in the regular SAS Graph window. But since it looks better in the graphics window, I tried doing ODS GRAPHICS ON; first. But when I do that and then submit the code, I don't get a survival curve in any window. I don't get an error in the Log window. The Log window looks normal and the output in the Output window looks normal. But I just don't get a survival curve. Any ideas?
Valued Guide
Posts: 2,107

Re: No survival plot in PROC LIFETEST.

check the ODS options in the LIFETEST documentation. You have to add something to the PROC statement to get the K-M plots.
Contributor n6
Contributor
Posts: 62

Re: No survival plot in PROC LIFETEST.

D'oh, that was so dumb of me. I had forgotten to do ODS HTML; first. I guess if you don't tell if it you want HTML or RTF or whatever then ODS GRAPHICS ON; doesn't do you any good. Thanks for your help.
Occasional Contributor reb
Occasional Contributor
Posts: 9

Re: No survival plot in PROC LIFETEST.

You need something like this in the first two lines:

ods graphics on;

proc lifetest data=A NOTABLE plots=(s(name=surv2));
Ask a Question
Discussion stats
  • 3 replies
  • 93 views
  • 0 likes
  • 3 in conversation