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!
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.
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!
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).
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=
I want to use this, but what do I plug in for alpha?
hi(t) = exp(α + β1xi1 + β2xik + ・ ・ ・+ βkxik)
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.
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.
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.