Hazardratio statement, interaction in Proc Phreg (cox-regression)

#1
Hello SAS friends, I have a question that I cannot solve.

I am about to use cox-regression to estimate the interaction between two binary variables: Disease (1,0) and Drug (1,0).

Disease: 1=Disease, 0=No disease
Drug: 1=Drug, 0=No drug

This make the interaction a “2x2 table” (as below). Here is the SAS code:

Code:
proc phreg data=Data;
class Drug(ref='0') Disease(ref='0') /param=glm;
model Duration*Event(0) =  Disease    Drug   Disease|Drug / ties=Efron rl;
hazardratio 'T1' Disease  / at (Drug=all) ; run;
Here is the output:
Output.JPG

The second table only presents those with Disease =1 and Drug=1 and 0. But how do I get those without disease and with and without drug?
Output2.JPG

Question: How do I do to get all Hazard Ratios estimates in the 2x2 table? Something with the HazardRatio statement?

Thanks!
Robin
 
#2
Hello again... I made a change:

Code:
hazardratio 'T1' Disease  / diff=pairwise;
Output3.JPG

Now I get all estimates. But shouldn't there be one reference category? (Disease=0,Drug=0)
 

hlsmith

Not a robit
#3
Yeah, I would imagine the HazardRatio statement is needed to specify the desired estimate. Perhaps look towards proc logistic examples to see how they solved a similar question, I am guessing with an estimate or contrast statement. Sorry I don't have time to be more helpful. :(
 

noetsi

Fortran must die
#4
I think you need to specify a reference level in the hazardratio statement.

This is what the documentation says (I don't see an example of how to do this, but I believe it is in this statement not in the Class statement)

AT (variable=ALL | REF | list <...variable=ALL | REF| list> )
specifies the variables that interact with the variable of interest and the corresponding values of the interacting variables. If the interacting variable is continuous and a numeric list is specified after the equal sign, hazard ratios are computed for each value in the list. If the interacting variable is a CLASS variable, you can specify, after the equal sign, a list of quoted strings corresponding to various levels of the CLASS variable, or you can specify the keyword ALL or REF. Hazard ratios are computed at each value of the list if the list is specified, or at each level of the interacting variable if ALL is specified, or at the reference level of the interacting variable if REF is specified.

If this option is not specified, PROC PHREG finds all the variables that interact with the variable of interest. If an interacting variable is a CLASS variable, variable= ALL is the default; if the interacting variable is continuous, variable=
is the default, where
is the average of all the sampled values of the continuous variable.

https://support.sas.com/documentati...L/default/viewer.htm#statug_phreg_sect014.htm

Note the following in another example

The third HAZARDRATIO statement, labeled ’H3’, compares the test therapy with the standard therapy. The DIFF=REF option specifies that each nonreference category is compared to the reference category. The purpose of using DIFF=REF here is to ensure that the hazard ratio is comparing the test therapy to the standard therapy instead of the other way around.

the code for this is
proc phreg data=VALung;
class Prior(ref='no') Cell(ref='large') Therapy(ref='standard');
model Time*Status(0) = Kps Cell Prior|Therapy;
hazardratio 'H1' Kps / units=10 cl=both;
hazardratio 'H2' Cell / cl=both;
hazardratio 'H3' Therapy / diff=ref cl=both;
proc phreg data=VALung;
class Prior(ref='no') Cell(ref='large') Therapy(ref='standard');
model Time*Status(0) = Kps Cell Prior|Therapy;
hazardratio 'H1' Kps / units=10 cl=both;
hazardratio 'H2' Cell / cl=both;
hazardratio 'H3' Therapy / diff=ref cl=both;

https://support.sas.com/documentati...L/default/viewer.htm#statug_phreg_sect034.htm

BTW you might want to get "Survival Analysis Using SAS" by Paul Allison.