BookmarkSubscribeRSS Feed
Raymond-milan
Calcite | Level 5

Hello, 

 

I'm trying to include an interaction term in my cox regression model; one is a categorical variable (severite2=Mild or severe) and the second is continous (AgeAtAgentDate). Althouh i can see the HR estimates for all other variables in the model (the table is attached), I cannot see the HR estimates for the interaction term (AgeAtAgentDate, severite, severite*AgeAtAgentDate). 

 
proc phreg data=RMDATA.CCDAnalysis NAMELEN=100 MULTIPASS;​
    class Severite2(ref="Mild")  / param=ref;​
    model TimetoHospitDeathcardioByYear*HospitDeathByCardio(0)= severite|AgeAtAgentDate Urbain male NSRG
        / SELECTION=B SLS=1 include=1 ties=discrete rl;​
    ods output ParameterEstimates=EstimCCD ModelBuildingSummary=MSCCD;​
OUTPUT OUT=OUT XBETA=x;​

run;

1 REPLY 1
Reeza
Super User

@Raymond-milan wrote:

Hello, 

 

I'm trying to include an interaction term in my cox regression model; one is a categorical variable (severite2=Mild or severe) and the second is continous (AgeAtAgentDate). Althouh i can see the HR estimates for all other variables in the model (the table is attached), I cannot see the HR estimates for the interaction term (AgeAtAgentDate, severite, severite*AgeAtAgentDate). 

 
proc phreg data=RMDATA.CCDAnalysis NAMELEN=100 MULTIPASS;​
    class Severite2(ref="Mild")  / param=ref;​
    model TimetoHospitDeathcardioByYear*HospitDeathByCardio(0)= severite|AgeAtAgentDate Urbain male NSRG
        / SELECTION=B SLS=1 include=1 ties=discrete rl;​
    ods output ParameterEstimates=EstimCCD ModelBuildingSummary=MSCCD;​
OUTPUT OUT=OUT XBETA=x;​

run;


You need to add explicit hazardratio statements to get interaction estimates. See the HAZARDRATIO documentation for more details on the specification. 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 960 views
  • 0 likes
  • 2 in conversation