BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
scan
Obsidian | Level 7

Dear Community.

 

Based on a paper found on the web (source: http://www.biostat.umn.edu/~will/6470stuff/Class27-12/Handout27.pdf)
I'm trying to replicate the analysis starting from slide 22 (page 11), therefore I'm trying to test the hazards assumpion of "ratio hazards is a costant that does not depent on time", let's say testing if the hazard ration changes over time.
Basically I'm adding a predictor for group*time interaction and evaluating if is not zero looking at the p-value for ChiSquare test (for the PS_time in the following code).

 

Proc PHreg data=breast_cancer; 
class positive_stain; 
model surv_months * died(0) = positive_stain PS_time / risklimits ties=efron; 
PS_time = positive_stain * surv_months;

 But, before finding this "paper" I wrote the same code with the only difference of adding the interaction directly in the model statement and, for some reason, I found different results for significance.

 

Proc PHreg data=breast_cancer; 
class positive_stain; 
model surv_months * died(0) = positive_stain positive_stain * surv_months / risklimits ties=efron; 

Can anyone explain me why this is happening, and maybe which is the correct code to be launched in order to test the proportional hazards assumption (detailing the reasons)?

Many thanks for taking the time to read this,

Gianlu

1 ACCEPTED SOLUTION

Accepted Solutions
JacobSimonsen
Barite | Level 11

if you put the time directly into the right side in the model statement then you will conditioning with the future. It doesnt give meaningfull estimates. It happens because when it evaluates the risk at t0 for an individual with survival time = t1, then it use the information that the person was either dead or censored at t1.

 

If you construct the variable PS_time inside phreg, then ps_time is updated along the time axis. it means that the same individual can takes different values of ps_time. The time value surv_months used to constrict ps_time is not fixed for an individual, it takes all values of risk-set times up to the value of the time of censoring or death.

View solution in original post

2 REPLIES 2
JacobSimonsen
Barite | Level 11

if you put the time directly into the right side in the model statement then you will conditioning with the future. It doesnt give meaningfull estimates. It happens because when it evaluates the risk at t0 for an individual with survival time = t1, then it use the information that the person was either dead or censored at t1.

 

If you construct the variable PS_time inside phreg, then ps_time is updated along the time axis. it means that the same individual can takes different values of ps_time. The time value surv_months used to constrict ps_time is not fixed for an individual, it takes all values of risk-set times up to the value of the time of censoring or death.

scan
Obsidian | Level 7
Thank you very much for the help.
I really appreciate it.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 2408 views
  • 1 like
  • 2 in conversation