Programming the statistical procedures from SAS

PROC PHREG interaction definition

Accepted Solution Solved
Reply
Contributor
Posts: 25
Accepted Solution

PROC PHREG interaction definition

[ Edited ]

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


Accepted Solutions
Solution
‎11-23-2016 06:11 AM
Super Contributor
Posts: 287

Re: PROC PHREG interaction definition

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


All Replies
Solution
‎11-23-2016 06:11 AM
Super Contributor
Posts: 287

Re: PROC PHREG interaction definition

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.

Contributor
Posts: 25

Re: PROC PHREG interaction definition

Thank you very much for the help.
I really appreciate it.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 217 views
  • 1 like
  • 2 in conversation