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

in PROC PHREG, is it possible to obtain a  "failure" plot instead of a survival plot?

for example, below will produce an adjusted survival curve.

proc phreg data=x    plots(overlay)=s;

  class trt;

  model;

  baseline covariates=x  out=y SURVIVAL=Survival     /diradj group=trt;

run;

what I'm interested in is a failure curve to show cumulative probability of failure

In PROC LIFETEST when can request to change the default survival to failure curve. Is this available in PHREG?

proc lifetest data=x  plot=(survival ( failure));

..

run;

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
JacobSimonsen
Barite | Level 11

Hi,

No, the probability plot of failure is not possible to obtain directly from phreg - not as far as I know.

But, it is not more difficult to obtain than to calculate 1-survivalprobability.

data y;

  set y;

prob_of_failure=1-survival;

run;

Jacob

View solution in original post

4 REPLIES 4
JacobSimonsen
Barite | Level 11

Hi,

No, the probability plot of failure is not possible to obtain directly from phreg - not as far as I know.

But, it is not more difficult to obtain than to calculate 1-survivalprobability.

data y;

  set y;

prob_of_failure=1-survival;

run;

Jacob

Altal
Calcite | Level 5

Thanks for response. I couldn't get it to work using any of the proc options. However, I was able to manipulate the template for the survival plot (Stat.Phreg.Graphics.Survival), and specifying (y=eval(1-SURVIVAL) ) in the seriesplot statement.

OsoGris
SAS Employee
That is a good solution for those comfortable with modifying the underlying ODS Graphics template for the SurvivalPlot.
OsoGris
SAS Employee
JacobSimonsen is correct. You can post-process the BASELINE data set to compute failure = 1 - survival and then plot failure versus time with PROC SGPLOT (for an ODS Graphics type plot) or PROC GPLOT (for a traditional graphics type plot).

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 2799 views
  • 4 likes
  • 3 in conversation