Programming the statistical procedures from SAS

create a survival curve not using Lifetest but Phreg

Reply
Occasional Contributor
Posts: 11

create a survival curve not using Lifetest but Phreg

Hi, I have some questions about how to create survival curve when I consider some other covariates. Although I have referred to Example 64.1 (9.2 user guide), I also face some difficulty. In the example, there are only two interested covariates which are used to divide the two groups and are the category variables. If I have more than two covariates which include even up to 10 covariates or numerical variables, it is not easy to divide groups using the covariates. How should I create the survival curves when I consider much more covariates which include numerical variables?  thanks.

Valued Guide
Posts: 2,108

create a survival curve not using Lifetest but Phreg

Cynthia's response #2 in http://communities.sas.com/thread/31692?tstart=0 is the way to do it unless you are going to stratify on the variables rather than model them.  However, you can't stratify on a continuous variable, so you are back to fixing the level of each covariate and computing the estimate of the curve at that level.  See Harrell's Regression Modeling Strategies book for more on the theory and process.

I would typically draw a curve for each of the levels of the categorical variable of interest (e.g. treatment) and set the other variables to a default value (e.g. male sex) or to a mean (e.g. for age).  You can do this incorporating both stratification and modeling variables.

Doc Muhlbaier

Duke

Occasional Contributor
Posts: 11

create a survival curve not using Lifetest but Phreg

Thanks a lot. You are right. Just as what you said, I want to use only one categorical variable of interest (eg. treatment) for stratification while others (confounding factors such as age, sex, hypertension, and so on.) for modeling variables (eg. model  death=age sex hypertension; treatment used as stratification). I perform it using SPSS, but can't operate it using SAS. Could you give me suggestion about which books I would refer to? or please provide me with brief codes as an example for me? thanks again.

Valued Guide
Posts: 2,108

create a survival curve not using Lifetest but Phreg

SAS has Books By Users by both Cantor and Allison on Survival analysis; both are readable.  Closer at hand for you is the SAS manual.  For instance, example 66.3 in the SAS 9.3 section of the SAS/Stat manual seems to fit your situation pretty well:

http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_phreg_sect04...

SAS 9.3 has made significant enhancements to the ODS statistical graphics, which may help you on drawing the plots (I don't think that the syntax has changed materially.)

Occasional Contributor
Posts: 11

create a survival curve not using Lifetest but Phreg

First, thanks for your help. but  example 66.3 in the SAS 9.3 section of the SAS/Stat manual is just generally Cox regression, and doesn't provide how to create survival curve based on groups. I just want to create two survival curve by groups (based on one category variable such as treatment) considering confounding factors like age, sex. I know the Proc Lifetest can create two survival curve without considering other confounding factors.

Valued Guide
Posts: 2,108

create a survival curve not using Lifetest but Phreg

In SAS 9.3, simply specify /plots=survival.  It's in the manual.

Occasional Contributor
Posts: 11

create a survival curve not using Lifetest but Phreg

thank you a lot. I will try it according to what you said.

Ask a Question
Discussion stats
  • 6 replies
  • 183 views
  • 3 likes
  • 2 in conversation