BookmarkSubscribeRSS Feed
msecic
Calcite | Level 5

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!

6 REPLIES 6
djbateman
Lapis Lazuli | Level 10

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.

msecic
Calcite | Level 5

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!

djbateman
Lapis Lazuli | Level 10

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).

msecic
Calcite | Level 5

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=

msecic
Calcite | Level 5

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

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

djbateman
Lapis Lazuli | Level 10

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 842 views
  • 0 likes
  • 2 in conversation