Help using Base SAS procedures

PHREG output statement question

Reply
Contributor
Posts: 30

PHREG output statement question

In phreg, using the output statement with survival=
option, what is the formula to recreate the survival= calculation?  I cannot recreate it.

Thank you very much!

Regular Contributor
Posts: 237

Re: PHREG output statement question

Someone can correct me if I am wrong, but I believe it is displaying the conditional survival probability.  Here is a simple example:

Time     Num. Events     Num. Censored     Num. at risk     Survival

0               0                         0                         7                 1.00

1               0                         0                         7                 1.00  

2               1                         0                         7                 6/7 = 0.86

3               1                         2                         6                 0.86*5/6 = 0.71

4               1                         0                         3                 0.71*2/3 = 0.48

5               1                         0                         2                 0.48 * 1/2 = 0.24

6               0                         1                         1                 ------------

Survival is calculated as:

Survival = Survival[i-1] * (Num. at risk) - (Num. Events) / (Num. at risk)

See if this reproduces what you get.

Contributor
Posts: 30

Re: PHREG output statement question

Posted in reply to djbateman

from PHREG I get the betas and HRs, I thought i would use a function of the betas, but I'm not sure exactly what function to use.

Thanks!

Regular Contributor
Posts: 237

Re: PHREG output statement question

I don't understand if you have a continuing question or are just making a comment.  You are getting the betas and HRs in the survival= variable?  When you use the output statement, you specify an output dataset (out=) and a name for the survival variable (survival=).  That out= dataset will be stored in your work library, but you will still get parameter estimates and hazard ratios output to your SAS output (or wherever your preferences are set to put it).

Contributor
Posts: 30

Re: PHREG output statement question

I'm trying to use the betas from the model, plug in the individual patient data into a formula with the betas and try to recreate the exact values that I get in the survival=

Contributor
Posts: 30

Re: PHREG output statement question

I want to use this, but what do I plug in for alpha?

hi(t) = exp(α + β1xi1 + β2xik + ・ ・ ・+ βkxik)

Regular Contributor
Posts: 237

Re: PHREG output statement question

I am afraid that this becomes outside of my scope.  I have actually been trying to figure out the same thing.  I don't know if we can do it by hand.  I hope someone else out there on the discussion board can help out.

Ask a Question
Discussion stats
  • 6 replies
  • 192 views
  • 0 likes
  • 2 in conversation