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. 

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

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
  • 1048 views
  • 0 likes
  • 2 in conversation