# st: interaction terms in a Cox model

 From Ashwin Ananthakrishnan To statalist@hsphsun2.harvard.edu Subject st: interaction terms in a Cox model Date Sat, 14 Apr 2007 18:06:38 -0700 (PDT)

```Hi,

I'm using Stata 8.0 to test predictors of survival
(agecat, race, and gender) using Cox proportional
hazards regression. It gives me the following
output.

======================================================

. xi: stcox i.agecat i.race*i.gender
i.agecat          _Iagecat_0-3        (naturally
coded; _Iagecat_0 omitted)
i.race            _Irace_0-3          (naturally
coded; _Irace_0 omitted)
i.gender          _Igender_0-1        (naturally
coded; _Igender_0 omitted)
i.race*i.gender   _IracXgen_#_#       (coded as above)

failure _d:  cens24mo == 1
analysis time _t:  ptime24mo

Iteration 0:   log likelihood = -15962.398
Iteration 1:   log likelihood = -15930.693
Iteration 2:   log likelihood = -15930.117
Iteration 3:   log likelihood = -15930.116
Refining estimates:
Iteration 0:   log likelihood = -15930.116

Cox regression -- Breslow method for ties

No. of subjects =        13855
Number of obs   =     13855
No. of failures =         1750
Time at risk    =      4691755
LR
chi2(10)     =     64.56
Log likelihood  =   -15930.116
Prob > chi2     =    0.0000

------------------------------------------------------------------------------
_t | Haz. Ratio   Std. Err.      z    P>|z|
[95% Conf. Interval]
-------------+----------------------------------------------------------------
_Iagecat_1 |   .9950285   .1272909    -0.04   0.969
.7743618    1.278578
_Iagecat_2 |   1.213802   .1492527     1.58   0.115
.9538532    1.544593
_Iagecat_3 |   1.631485   .2226493     3.59   0.000
1.248588    2.131802
_Irace_1 |   1.404169   .1757516     2.71   0.007
1.098701    1.794565
_Irace_2 |   .8859186   .1215945    -0.88   0.377
.6769621    1.159373
_Irace_3 |    .852908   .1614797    -0.84   0.401
.5884988    1.236115
_Igender_1 |   .9002461   .0539135    -1.75   0.079
.8005434    1.012366
_IracXge~1_1 |    1.04967   .1669058     0.30   0.760
.768608    1.433509
_IracXge~2_1 |   1.075934   .1824927     0.43   0.666
.7716325     1.50024
_IracXge~3_1 |   1.046932   .2437096     0.20   0.844
.6633949     1.65221
------------------------------------------------------------------------------

. test _IracXgen_1_1 _IracXgen_2_1 _IracXgen_3_1

( 1)  _IracXgen_1_1 = 0
( 2)  _IracXgen_2_1 = 0
( 3)  _IracXgen_3_1 = 0

chi2(  3) =    0.27
Prob > chi2 =    0.9660

=====================================================

Since the P >0.05 for the null hypothesis that the
interaction terms are equal to zero, is it safe to
conclude that there is no significant interaction
between race and gender?

Thanks,

Ashwin

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```