Hi all -
There are some similar posts about this topic but none that specifically answer my question. Using Stata v14.1, I ran a Cox model which included an interaction term for two continuous variables. This term was significant. I followed up with a lincom command to get the hazard ratio for the interaction, but this was not significant. I am not sure why one is significant and the other is not. I'm assuming I must be doing something wrong with my code. I also tried using the margins command as suggested in another post, but this yielded an error message, "factor variables may not contain noninteger values". My variables do not have any noninteger values. Any help sorting this out would be much appreciated.
failure _d: colorectal == 1
analysis time _t: time
id: id
Iteration 0: log likelihood = -22630.355
Iteration 1: log likelihood = -22385.838
Iteration 2: log likelihood = -22385.147
Iteration 3: log likelihood = -22385.093
Iteration 4: log likelihood = -22385.092
Iteration 5: log likelihood = -22385.092
Refining estimates:
Iteration 0: log likelihood = -22385.092
Cox regression -- Breslow method for ties
No. of subjects = 134,017 Number of obs = 134,017
No. of failures = 1,952
Time at risk = 1569353.803
LR chi2(18) = 490.53
Log likelihood = -22385.092 Prob > chi2 = 0.0000
-----------------------------------------------------------------------------------------
_t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval]
------------------------+----------------------------------------------------------------
EPAplusDHA | .5044889 .2055583 -1.68 0.093 .2269981 1.121195
f60solfb | .9652983 .0208153 -1.64 0.101 .9253512 1.00697
age | 1.063833 .0035574 18.50 0.000 1.056883 1.070828
bmi | 1.024562 .0043645 5.70 0.000 1.016044 1.033152
smoking | 1.103438 .0370171 2.93 0.003 1.033219 1.178428
educ | 1.021955 .0308403 0.72 0.472 .9632625 1.084225
f60alc | .9986251 .0022477 -0.61 0.541 .9942293 1.00304
tothormonestat | .7813583 .0367145 -5.25 0.000 .7126133 .8567351
texpwk | .9965047 .0018905 -1.85 0.065 .9928063 1.000217
f60enrgy | 1.000179 .0000817 2.19 0.028 1.000019 1.000339
f60fldeq | .9997964 .0001836 -1.11 0.267 .9994367 1.000156
f60calc | .9997787 .0000787 -2.81 0.005 .9996245 .999933
redmeat | .9957916 .0571086 -0.07 0.941 .8899222 1.114256
dmarm | 1.015401 .0315733 0.49 0.623 .9553661 1.079208
hrtarm | 1.013579 .0219306 0.62 0.533 .971494 1.057486
cadarm | .9951817 .0420857 -0.11 0.909 .9160212 1.081183
colorel | 1.055499 .0367989 1.55 0.121 .9857837 1.130145
|
c.EPAplusDHA#c.f60solfb | 1.133301 .068782 2.06 0.039 1.0062 1.276457
-----------------------------------------------------------------------------------------
( 1) EPAplusDHA + f60solfb + c.EPAplusDHA#c.f60solfb = 0
------------------------------------------------------------------------------
_t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | .5518976 .199766 -1.64 0.101 .2714913 1.121918
------------------------------------------------------------------------------
EPAplusDHA: factor variables may not contain noninteger values
r(452);
Sandi
There are some similar posts about this topic but none that specifically answer my question. Using Stata v14.1, I ran a Cox model which included an interaction term for two continuous variables. This term was significant. I followed up with a lincom command to get the hazard ratio for the interaction, but this was not significant. I am not sure why one is significant and the other is not. I'm assuming I must be doing something wrong with my code. I also tried using the margins command as suggested in another post, but this yielded an error message, "factor variables may not contain noninteger values". My variables do not have any noninteger values. Any help sorting this out would be much appreciated.
Code:
stcox EPAplusDHA f60solfb age bmi smoking educ f60alc tothormonestat texpwk /// > f60enrgy f60fldeq f60calc redmeat dmarm hrtarm cadarm colorel c.EPAplusDHA#c.f60solfb
analysis time _t: time
id: id
Iteration 0: log likelihood = -22630.355
Iteration 1: log likelihood = -22385.838
Iteration 2: log likelihood = -22385.147
Iteration 3: log likelihood = -22385.093
Iteration 4: log likelihood = -22385.092
Iteration 5: log likelihood = -22385.092
Refining estimates:
Iteration 0: log likelihood = -22385.092
Cox regression -- Breslow method for ties
No. of subjects = 134,017 Number of obs = 134,017
No. of failures = 1,952
Time at risk = 1569353.803
LR chi2(18) = 490.53
Log likelihood = -22385.092 Prob > chi2 = 0.0000
-----------------------------------------------------------------------------------------
_t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval]
------------------------+----------------------------------------------------------------
EPAplusDHA | .5044889 .2055583 -1.68 0.093 .2269981 1.121195
f60solfb | .9652983 .0208153 -1.64 0.101 .9253512 1.00697
age | 1.063833 .0035574 18.50 0.000 1.056883 1.070828
bmi | 1.024562 .0043645 5.70 0.000 1.016044 1.033152
smoking | 1.103438 .0370171 2.93 0.003 1.033219 1.178428
educ | 1.021955 .0308403 0.72 0.472 .9632625 1.084225
f60alc | .9986251 .0022477 -0.61 0.541 .9942293 1.00304
tothormonestat | .7813583 .0367145 -5.25 0.000 .7126133 .8567351
texpwk | .9965047 .0018905 -1.85 0.065 .9928063 1.000217
f60enrgy | 1.000179 .0000817 2.19 0.028 1.000019 1.000339
f60fldeq | .9997964 .0001836 -1.11 0.267 .9994367 1.000156
f60calc | .9997787 .0000787 -2.81 0.005 .9996245 .999933
redmeat | .9957916 .0571086 -0.07 0.941 .8899222 1.114256
dmarm | 1.015401 .0315733 0.49 0.623 .9553661 1.079208
hrtarm | 1.013579 .0219306 0.62 0.533 .971494 1.057486
cadarm | .9951817 .0420857 -0.11 0.909 .9160212 1.081183
colorel | 1.055499 .0367989 1.55 0.121 .9857837 1.130145
|
c.EPAplusDHA#c.f60solfb | 1.133301 .068782 2.06 0.039 1.0062 1.276457
-----------------------------------------------------------------------------------------
Code:
lincom EPAplusDHA + f60pect + c.EPAplusDHA#c.f60solfb, hr
------------------------------------------------------------------------------
_t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | .5518976 .199766 -1.64 0.101 .2714913 1.121918
------------------------------------------------------------------------------
Code:
margins EPAplusDHA#f60solfb
r(452);
Sandi
Comment