BookmarkSubscribeRSS Feed
kc
Quartz | Level 8 kc
Quartz | Level 8

I have a dataset (one row per subject) with the possibility that a subject can experience 3 events, one of them being death. I am using the following code to get cause specific hazard ratios for treatment group A vs. B at different levels of variable 'Category' for each of these 3 events. So, the 'Status' variable has 4 values, 0-no events, 1-event1, 2-event2, 3-death. And there are 5 effects including an interaction term in the model.

 

I have the following questions - 

1. Should the time variable be the number of days until the first event (among all 3) or no event occurs

2. Is the code below correct. If so, the only changes when running the code for event types 2 and 3 are the censoring values

3. When asked for an interaction p-value for the 'Category*Trt' term, does reporting the p-value from the joint tests of the SAS output the right thing to do

 

Code below for Event Type 1 (Status=1)

proc phreg data=ds;

class Trt(ref='B') Category(ref='1') Sex(ref='Female');

model T*Status(0, 2, 3) = Category  Trt  Category*Trt   Age  Sex;

hazardratio "A vs. B" Trt / at(Category=all) diff=pairwise;

run;

 

Thanks!

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 0 replies
  • 764 views
  • 0 likes
  • 1 in conversation