Hi All, I'm specifying some custom hazard ratios in a Cox PH reg model with multiple 2-way interaction terms and as a sanity check, I'm comparing some of the results I get from the HAZARDRATIO statement to the CONTRAST statements I specify. The problem is, these results aren't matching up. Below is some example code, the data, and the output: The data: data WORK.SURVIVALDATA; infile datalines dsd truncover; input YEARDX:BEST. SURV_MON_ACT:BEST. BELOW200CTACS2011:BEST. CHRLSON:BEST. race_r:32. sex_r:32. agecatt:32. vitstat_r:32. urbanrural:32.; datalines; 2010 0 42.2 8 1 1 4 0 0 2015 10 15.2 5 1 1 3 0 0 2014 3 66.2 3 1 2 4 0 1 2010 69 43.1 2 1 2 4 0 0 2012 3 63.2 0 1 1 4 0 0 ;;;; run; The code: proc phreg data=survivaldata; class race_r sex_r urbanrural agecatt; strata yeardx agecatt; model surv_mon_act*vitstat_r (1)= sex_r chrlson race_r below200ctacs2011 urbanrural agecatt agecatt*below200ctacs2011 below200ctacs2011*race_r agecatt*race_r/type1; format sex_r gender.; format race_r racefmt.; contrast 'Hispanic vs. Non-Hispanic White at below200ctacs2011=10 and agecatt=1' race_r 0 1 0 below200ctacs2011 10 agecatt 1 0 0 agecatt*below200ctacs2011 10 0 0 below200ctacs2011*race_r 0 10 0 agecatt*race_r 0 0 0 1/e estimate=exp; hazardratio race_r/cl=wald at (below200ctacs2011=10); where surv_mon_act ne 9999; run; From the hazardratio statement (HR 95% CI): From my contrast statement: Based on this, I was wondering two things: 1. Is this happening because my CONTRAST statement syntax is wrong or because of a difference in how the HAZARDRATIO and CONTRAST statements calculate the HR's? (I use SAS 9.4 FWIW) 2. If I wanted to calculate 'Hispanic vs. Non-Hispanic White at BELOW200CTACS2011=10' (with equal distribution of weights among the other interaction terms) how would I change the CONTRAST statement accordingly?
... View more