Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Interpretating interat

    Dear statalist,

    The headline of my question was cut short... Apologies. The question title should read : "Interpretating interaction effects in logistic regression".

    I am investigating the role of comorbidities (measured as ASA-score, categorical 0-4) and age on mortality after surgery. It is well known that both age and comorbidities increase mortality risk. It is less known how the interaction between the two affect the risk. My hypothesis is that a healthy (ASA-score 1 or 2) 70-year old patient have a lower risk of mortality than a sick (ASA-score 3 or 4) 40 year old patient. In other words, I want to examine the interaction effect between age and ASA-score on mortality. I am struggling how to analyze and present this in a scientificially sound way as well as how to perform the actual analyses. My main concerns are the following (if I have understood the concept of interactions of logistic regression correctly):
    1. Interactions (age and ASA in my example) in logistic regression is complicated, and the effect (size and significance) depends on the values of the ASA and Age.
    2. The size interaction effect also depends on the values of the other co-variates. I.e. a male, 50-year old patient with ASA 1 might have a significant interaction effect between age and ASA, but a female 50-year old patient with ASA 1 does not?
    If the above is correctly understood, how do you suggest I should report the interaction effects. It does not make sense to just report a significant / non-significant effect, rather maybe I should discuss a range of values where the effect is significant?

    My idea is the following (please comment if you think there is a better way):
    1. Report that there is an "overall" significant interaction term between age (as continous variable) and ASA-score (categorized 1-4).
    2. Visualize the interactions between all combinations of age (in 5-year categories) and ASA (categorized 1-4) via marginsplot or a contour graph.
    I am unsure how to do this in Stata. Below is my code:

    Code:
    replace Age =95 if Age>95 & Age!=.
    
    logistic Mortality30Days c.Age##i.ASAScore i.Sex i.Income i.Education ib1.TypeOfSurgery_cat i.Hospsize_cat
    Results:
    Code:
         
    [IMG]https://www.statalist.org/forums/core/0.9 StartHTML:0000000105 EndHTML:0000003645 StartFragment:0000000136 EndFragment:0000003612 <HTML><BODY>{C}<!--StartFragment--><TABLE BORDER><tr><td>Logistic regression</td><td>Number of obs</td><td>=</td><td>245,652</td></tr><tr><td> LR chi2(22)</td><td>=</td><td>2623.22</td></tr><tr><td> Prob > chi2</td><td>=</td><td>0.0000</td></tr><tr><td>Log likelihood = -6667.8113</td><td>Pseudo R2</td><td>=</td><td>0.1644</td></tr><tr><td> </td><td> </td><td> </td></tr><tr><td>Mortality30Days *Odds Ratio</td><td>Std. Err. * * *z</td><td> P>z * * [95% Conf.</td><td>Interval]</td></tr><tr><td> </td><td> </td><td></td></tr><tr><td>Age * *1.108676</td><td>.0313988 * * 3.64</td><td> 0.000 * * 1.048812</td><td>1.171956</td></tr><tr><td> ASAScore </td></tr><tr><td>ASA Score 2 * * 43.88958</td><td>90.83688 * * 1.83</td><td> 0.068 * * .7597249</td><td>2535.517</td></tr><tr><td>ASA Score 3 * * 381.0945</td><td>777.651 * * 2.91</td><td> 0.004 * * 6.983838</td><td>20795.59</td></tr><tr><td>ASA score >3 * * 8844.159</td><td>18450.79 * * 4.36</td><td> 0.000 * * 148.2072</td><td>527768.7</td></tr><tr><td> ASAScore#c.Age </td></tr><tr><td>ASA Score 2 * * .9620611</td><td>.0278646 * *-1.34</td><td> 0.182 * * .9089687</td><td>1.018255</td></tr><tr><td>ASA Score 3 * * .9504435</td><td>.0271475 * *-1.78</td><td> 0.075 * * .8986972</td><td>1.005169</td></tr><tr><td>ASA score >3 * * *.932225</td><td>.0271244 * *-2.41</td><td> 0.016 * * .8805496</td><td>.9869329</td></tr><tr><td> Sex </td></tr><tr><td>Male * * 1.187825</td><td>.0740583 * * 2.76</td><td> 0.006 * * 1.051192</td><td>1.342218</td></tr><tr><td> Income </td></tr><tr><td>Medium Income * * .8368125</td><td>.0625113 * *-2.38</td><td> 0.017 * * .7228396</td><td>.968756</td></tr><tr><td>High Income * * .8475343</td><td>.1446554 * *-0.97</td><td> 0.332 * * *.606563</td><td>1.184237</td></tr><tr><td> Education </td></tr><tr><td>Medium Education * * .8625545</td><td>.0560413 * *-2.28</td><td> 0.023 * * .7594215</td><td>.9796935</td></tr><tr><td>High Education * * .7128518</td><td>.0584647 * *-4.13</td><td> 0.000 * * .6069987</td><td>.8371643</td></tr><tr><td> TypeOfSurgery_cat </td></tr><tr><td>A. Neuro surgery * * 5.078578</td><td>1.211138 * * 6.81</td><td> 0.000 * * 3.182349</td><td>8.10469</td></tr><tr><td>D E. ENT surgery * * 1.942009</td><td>.5918672 * * 2.18</td><td> 0.029 * * 1.068636</td><td>3.529169</td></tr><tr><td>G. Pulmonary & thoracic surgery * * 6.041204</td><td>1.619976 * * 6.71</td><td> 0.000 * * 3.571659</td><td>10.21826</td></tr><tr><td>J. Abdominal surgery * * 6.453883</td><td>1.453572 * * 8.28</td><td> 0.000 * * 4.150589</td><td>10.03535</td></tr><tr><td>K. Urological surgery * * 2.827088</td><td>.6747493 * * 4.35</td><td> 0.000 * * 1.770845</td><td>4.51334</td></tr><tr><td>L. Gynecological surgery * * 1.260899</td><td>.3819491 * * 0.77</td><td> 0.444 * * .6963638</td><td>2.283099</td></tr><tr><td>N. Orthopedic surgery * * 3.088301</td><td>.7067283 * * 4.93</td><td> 0.000 * * 1.972106</td><td>4.836253</td></tr><tr><td>V. Vascular surgery * * 3.638874</td><td>.9102379 * * 5.16</td><td> 0.000 * * 2.228666</td><td>5.941401</td></tr><tr><td> Hospsize_cat </td></tr><tr><td>Central Hospital * * 1.398945</td><td>.11175 * * 4.20</td><td> 0.000 * * 1.196204</td><td>1.636048</td></tr><tr><td>University Hospital * * 1.911023</td><td>.1553724 * * 7.97</td><td> 0.000 * * 1.629523</td><td>2.241153</td></tr><tr><td> _cons * *1.33e-07</td><td>2.71e-07 * *-7.78</td><td> 0.000 * * 2.47e-09</td><td>7.18e-06</td></tr><tr><td> </td><td> </td><td></td></tr><tr><td>Note: _cons estimates baseline odds.</td></tr></TABLE>{C}<!--EndFragment--></BODY></HTML>[/IMG]Logistic regression Number of obs = 245,652 LR chi2(22) = 2623.22 Prob > chi2 = 0.0000 Log likelihood = -6667.8113 Pseudo R2 = 0.1644 Mortality30Days Odds Ratio Std. Err. z P>z [95% Conf. Interval]
    Age
    1.108676 .0313988 3.64 0.000 1.048812 1.171956
    ASAScore
    ASA Score 2 43.88958 90.83688 1.83 0.068 .7597249 2535.517 ASA Score 3 381.0945 777.651 2.91 0.004 6.983838 20795.59 ASA score >3 8844.159 18450.79 4.36 0.000 148.2072 527768.7
    ASAScore#c.Age
    ASA Score 2 .9620611 .0278646 -1.34 0.182 .9089687 1.018255 ASA Score 3 .9504435 .0271475 -1.78 0.075 .8986972 1.005169 ASA score >3 .932225 .0271244 -2.41 0.016 .8805496 .9869329
    Sex
    Male 1.187825 .0740583 2.76 0.006 1.051192 1.342218
    Income
    Medium Income .8368125 .0625113 -2.38 0.017 .7228396 .968756 High Income .8475343 .1446554 -0.97 0.332 .606563 1.184237
    Education
    Medium Education .8625545 .0560413 -2.28 0.023 .7594215 .9796935 High Education .7128518 .0584647 -4.13 0.000 .6069987 .8371643
    TypeOfSurgery_cat
    A. Neuro surgery 5.078578 1.211138 6.81 0.000 3.182349 8.10469 D+E. ENT surgery 1.942009 .5918672 2.18 0.029 1.068636 3.529169 G. Pulmonary & thoracic surgery 6.041204 1.619976 6.71 0.000 3.571659 10.21826 J. Abdominal surgery 6.453883 1.453572 8.28 0.000 4.150589 10.03535 K. Urological surgery 2.827088 .6747493 4.35 0.000 1.770845 4.51334 L. Gynecological surgery 1.260899 .3819491 0.77 0.444 .6963638 2.283099 N. Orthopedic surgery 3.088301 .7067283 4.93 0.000 1.972106 4.836253 V. Vascular surgery 3.638874 .9102379 5.16 0.000 2.228666 5.941401
    Hospsize_cat
    Central Hospital 1.398945 .11175 4.20 0.000 1.196204 1.636048 University Hospital 1.911023 .1553724 7.97 0.000 1.629523 2.241153 _cons 1.33e-07 2.71e-07 -7.78 0.000 2.47e-09 7.18e-06 Note: _cons estimates baseline odds.


    Code:
    margins, at(Age =(20(5)95) ASAScore =(1(1)4))
    
                          
            Delta-method
        Margin    Std. Err.    z    P>z    [95% Conf.    Interval]
                            
    _at    
    1    4.32e-06    6.32e-06    0.68    0.494    -8.06e-06    .0000167
    2    .0000875    .0000293    2.99    0.003    .0000301    .0001448
    3    .0005952    .00013    4.58    0.000    .0003405    .00085
    4    .0092659    .0035629    2.60    0.009    .0022827    .016249
    5    7.24e-06    9.58e-06    0.76    0.450    -.0000115    .000026
    6    .0001207    .0000367    3.29    0.001    .0000487    .0001928
    7    .0007731    .0001541    5.02    0.000    .000471    .0010752
    8    .0109019    .0038274    2.85    0.004    .0034004    .0184035
    9    .0000121    .0000144    0.84    0.400    -.0000161    .0000403
    10    .0001667    .0000457    3.65    0.000    .0000771    .0002562
    11    .0010041    .0001811    5.54    0.000    .000649    .0013591
    12    .0128217    .0040745    3.15    0.002    .0048358    .0208076
    13    .0000203    .0000213    0.95    0.341    -.0000215    .0000621
    14    .0002301    .0000562    4.10    0.000    .00012    .0003402
    15    .0013038    .0002107    6.19    0.000    .000891    .0017167
    16    .0150723    .0042912    3.51    0.000    .0066617    .0234829
    17    .000034    .0000311    1.09    0.275    -.000027    .0000951
    18    .0003176    .0000681    4.66    0.000    .0001841    .0004511
    19    .0016929    .0002418    7.00    0.000    .001219    .0021669
    20    .0177082    .0044614    3.97    0.000    .0089641    .0264523
    21    .000057    .0000446    1.28    0.202    -.0000305    .0001444
    22    .0004384    .0000812    5.40    0.000    .0002793    .0005974
    23    .0021978    .0002732    8.05    0.000    .0016624    .0027332
    24    .0207915    .0045658    4.55    0.000    .0118427    .0297404
    25    .0000954    .0000625    1.53    0.127    -.0000271    .0002179
    26    .000605    .0000946    6.39    0.000    .0004195    .0007905
    27    .0028526    .0003025    9.43    0.000    .0022598    .0034454
    28    .0243934    .0045835    5.32    0.000    .0154099    .033377
    29    .0001598    .0000852    1.87    0.061    -7.28e-06    .0003269
    30    .0008349    .0001075    7.77    0.000    .0006243    .0010456
    31    .0037014    .0003266    11.33    0.000    .0030613    .0043416
    32    .0285943    .004494    6.36    0.000    .0197862    .0374025
    33    .0002676    .0001136    2.36    0.018    .000045    .0004902
    34    .0011521    .0001185    9.73    0.000    .0009199    .0013843
    35    .0048012    .0003421    14.04    0.000    .0041307    .0054717
    36    .0334847    .0042852    7.81    0.000    .0250859    .0418835
    37    .0004482    .0001524    2.94    0.003    .0001495    .0007468
    38    .0015895    .000128    12.42    0.000    .0013386    .0018404
    39    .0062248    .0003473    17.92    0.000    .0055442    .0069055
    40    .0391657    .0039732    9.86    0.000    .0313783    .0469531
    41    .0007504    .0002267    3.31    0.001    .0003061    .0011946
    42    .0021925    .0001438    15.25    0.000    .0019106    .0024743
    43    .0080658    .0003508    23.00    0.000    .0073784    .0087533
    44    .0457488    .0036538    12.52    0.000    .0385875    .0529102
    45    .001256    .0004106    3.06    0.002    .0004513    .0020607
    46    .0030231    .0001916    15.78    0.000    .0026477    .0033986
    47    .0104433    .0003913    26.69    0.000    .0096764    .0112102
    48    .0533561    .0035997    14.82    0.000    .0463009    .0604112
    49    .0021013    .0008462    2.48    0.013    .0004428    .0037598
    50    .0041667    .0003121    13.35    0.000    .003555    .0047784
    51    .0135083    .0005466    24.71    0.000    .012437    .0145796
    52    .0621185    .0042562    14.59    0.000    .0537765    .0704605
    53    .0035127    .0017793    1.97    0.048    .0000254    .007
    54    .0057393    .0005464    10.50    0.000    .0046684    .0068103
    55    .0174508    .0008848    19.72    0.000    .0157166    .019185
    56    .0721752    .0058908    12.25    0.000    .0606295    .083721
    57    .0058644    .0036564    1.60    0.109    -.001302    .0130307
    58    .0078989    .0009455    8.35    0.000    .0060457    .0097522
    59    .0225077    .0014535    15.48    0.000    .0196588    .0253565
    60    .0836701    .0084797    9.87    0.000    .0670502    .10029
    61    .0097688    .0072834    1.34    0.180    -.0045065    .0240441
    62    .0108588    .0015861    6.85    0.000    .0077501    .0139675
    63    .0289705    .0023154    12.51    0.000    .0244325    .0335086
    64    .0967488    .0119699    8.08    0.000    .0732884    .1202093
    Code:
    marginsplot, ytitle("Predicted probability of 30-day mortality") xtitle("Age") title("Predicted probability of 30-day mortality") subtitle("By age and ASA score")
    Ok, I am terribly sorry for the long post. But I need to show the results.


    Is the following a correct interpretation of the findings:
    1. There is a significant interaction effect between age and ASA-score, but only between age and the highest ASA-score (ASA score >3, p = 0.016).
    2. Looking at "margins results", there is a significant (none-zero) interaction effect between almost all combinations of age (categories of 5 years) and ASA-score. Those combinations that are none-significant ( _at: 1, 5, 9, 13, 17, 21, 25, 29, 57, 61) are younger patients with ASA-score ==1. The two last combinations (57 and 61) are really old patients with low ASA-score (very few fit these criterias).

    How can point 1. and 2. above exist together? Is the results from the logistic regression an overall interaction effect? I.e. that there is a none-significant overall interaction effect when taking into acount the young patients with low ASA-score, who have a non-significant interaction effect. The lack of significance "overall" in lower categories of ASA-score in the logistic regression is explained by the young patients with low ASA-score?

    Can someone help me interpret the results or possibly give suggestions how to perform a better interaction analysis?

    All the best, and thank you for this forum.

    /Jesper
    Last edited by Jesper Eriksson; 11 Mar 2024, 03:59.

  • #2
    I post the graphs for analysis without (1st picture) and with an interaction term (second picture). You can see that with the interaction term between age and ASA-score that the line for the patients with most comorbidities (ASA-score ≥3) flattens out.

    Graph without interaction term:

    Click image for larger version

Name:	no_interaction.png
Views:	1
Size:	140.6 KB
ID:	1746184


    Graph with interaction term:

    Click image for larger version

Name:	interaction.png
Views:	1
Size:	137.5 KB
ID:	1746185

    Comment

    Working...
    X