BookmarkSubscribeRSS Feed
Anita_n
Pyrite | Level 9

Dear all,

I am tring to do an overall survival analysis using the variable tumor staging (Kaplan-Meier function)

I have attached a sample data. Please, I need some help in doing this. I know I have to use proc lifetest but I want to do that correctly. thanks

5 REPLIES 5
FreelanceReinh
Jade | Level 19

Hello @Anita_n,

 

Before you can run PROC LIFETEST on your data, you need to supply survival times (i.e., populate variable time_in_days) for the censored observations (i.e., those with censor=0). For example, if a censored patient was followed up until date d, set time_in_days = - date_of_diagnosis for that patient. Then a generic PROC LIFETEST step might look like this:

proc lifetest data=have plots=(s);
time time_in_days*censor(0);
strata tumor_stage;
run;
Anita_n
Pyrite | Level 9

@FreelanceReinh @OsoGris  thankyou, Is it allowed for variable time_in_days to have missings?

FreelanceReinh
Jade | Level 19

@Anita_n wrote:

Is it allowed for variable time_in_days to have missings?


Observations with missing time_in_days will automatically be excluded from the analysis. The same holds for observations with missing censor or missing values of a STRATA variable. So PROC LIFETEST will run without errors, but with notes like

NOTE: 3 observations with invalid time, censoring, or strata values were deleted.

in the log and the output. The results will be the same as if you had omitted those incomplete observations in the first place. The information contained in their non-missing values is not used.

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1376 views
  • 2 likes
  • 3 in conversation