Programming the statistical procedures from SAS

PHREG

Accepted Solution Solved
Reply
Contributor
Posts: 62
Accepted Solution

PHREG

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


Accepted Solutions
Solution
‎03-10-2014 01:23 PM
Super Contributor
Posts: 271

Re: PHREG

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


All Replies
Solution
‎03-10-2014 01:23 PM
Super Contributor
Posts: 271

Re: PHREG

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

Contributor
Posts: 62

Re: PHREG

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.

SAS Employee
Posts: 18

Re: PHREG

That is a good solution for those comfortable with modifying the underlying ODS Graphics template for the SurvivalPlot.
SAS Employee
Posts: 18

Re: PHREG

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).
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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