BookmarkSubscribeRSS Feed
LarissaW
Obsidian | Level 7

Hi, I'm cleaning a cohort dataset and want to use Cox proportional to analyze. However, I'm confused about assigning the censor data in the coding.

 

The study lasted 3000 days. The exposure is high salty food and the outcome is the death from stomach cancer. Among the 100,000 participants, 12 patients eventually died from stomach cancer, 38 patients died from other diseases, and the remaining were alive at the end of the study. I'd like to use the cox proportional hazard model to investigate the association between high salty food and the mortality of stomach cancer.

 

Based on my understanding, we should assign "38 patients died from other diseases" censored (0) , and all the others uncensored (1). But how do we differ the result of dying by stomach cancer and still alive? Will the SAS automatically separate them?

 

this is the code I use:

proc phreg data=stomach;
class salty(ref="0") bmi(ref="0") gender(ref="0") / param=ref;
model lenfol*censor(0) = salty bmi gender year los;
strata=age;
run;

Could you please check if I correctly understand the model and use the correct codes? Thank you!

3 REPLIES 3
LarissaW
Obsidian | Level 7

Hey, thank you for the information. However, I don't think the competing risk model applied to my study. There is no competing relationship between patients alive and dead from stomach cancer. The question I have is I am confused with the define of the censored and uncensored groups here. I confirm that patients who died from other causes should be censored but I have no idea if patients survive until the end of the study belong to censored group or uncensored group. The event I am interested in here is the death from stomach cancer.

Reeza
Super User

People alive until the end are also censored then, competing risks doesn't necessarily mean competing against each other, but dying for another cause is a competing risk. It is common to ignore this though, competing risks is an analytics level above.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 666 views
  • 0 likes
  • 2 in conversation