turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- PROC PHREG - survival probability at specific poin...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-26-2017 06:30 PM

Hello,

I'm making a model in SAS 4GL using PROC PHREG procedure. In the output out statement it is possible to define a survival variable for each observation. This survival variable is the probability of survival until some point of time. My question is: what time is considered here? Is it a probability of surviving until time=0?

Is it possible to get a variable like this but describing a probability of surviving until some arbitraty defined point of time? (i.e. 1 year?)

My code is following:

ods graphics on; proc phreg data=train outest=estimates plots=(survival cumhaz); class &vars; model time*censor(1)=&vars / selection=stepwise ties=efron; output out=surv survival=s; run; ods graphics off;

Thanks in advance!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to klaur

03-26-2017 06:51 PM

Hi @klaur - hope you're having a good weekend!

I have done a lot of survival analysis but I admit i've only ever used PROC LIFETEST. One of the reasons is that it can generate a table such as the one i think you're looking for; screenshot below taken from here. You can output this table as a SAS dataset so you can use it for other purposes. Looking down the "Survival" column, I can find the point when 80% are still alive (or 20% failed).

Hopefully this will help; please post back and let me know if you need anything further.

Chris

Has my article or post helped? Please mark as Solution or Like the article!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to DarthPathos

03-27-2017 02:59 AM

Thank you for the reply! Unfortunately it's not really what I'm looking for. I'm making a Cox proportional hazards model so I need to use proc phreg procedure.

Plus what I want to obtain is a variable for each of the observations that tells me 'the probability of survival for this observation until let's say 1 year is something'.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to klaur

03-26-2017 07:47 PM

Since you have a model that's more complex than just a basic KM curve, you may also need to consider the values of the covariates when you're trying to calculate survival. If you're including the variables you have some belief that these affect survival so the estimates would be different give the values of the covariates.

The method to calculate the survival estimate is to use the BASELINE statement and specify the level of the covariates. The default is to use the Mean for continuous variables and the reference level for categorical variables.

See the documentation example labeled 'Survival Curves' in combination with the data behind the graphs if you want it as well.

http://blogs.sas.com/content/iml/2012/08/01/data-fro-ods-graphics.html

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

03-27-2017 03:02 AM

Thank you for the reply!

I know there is a possibility to use the baseline statement where I can define the specific covariates. However my purpose is not to see the survival just for some specific combination of covariates. I would like to see the estimated survival for each of my observations for the specific point of time.

Do you perhaps know what is the interpretation of the survival 's' I get in the output dataset when I use 'output out=dataset survival=s'. It is a probability of surviving but until what time?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to klaur

04-10-2017 01:21 AM

Hello,

I think I have the same issue as Klaur does. I'm working to get 5-year survival probability for each patinet in the dataset, and for that first I identified the So(t) by using the Baseline statement and setting the values of all covriates at ZERO, and then I looked into the dataset and took the So(5_y) which was the survival function corresponding to Time equals 5 years (or near to 5 years if I didn't have any value exactly equaled 5 years). Using the formual S(t)=So(t)^exp(XB) I could get the 5-year survival probab for each individual.

**BUT** I want to compare my findings with those generated by a program in SAS, and see if SAS gives me the same 5-year survival probablity for each individual in my dataset. So far I couldn't figure it out, as there is no way I can specify time=5 in SAS, and it gives error. I appreciate if someone can help on this.

**proc** **phreg** data=Mylib.dataset;

class group (ref ='1') category (ref ='1')/ param=ref;

model time (**time=5**)*event(0)= group category age;

baseline covariates=Mylib.dataset OUT=Pred1 survival=_all_;

**run**;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Tawfiq

04-10-2017 02:21 AM

Have you checked the dataset created by OUT option on BASELINE statement or the TIMELIST option?