Announcement

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

  • Subanalysis

    Hello,

    I have a few questions regarding interaction terms.

    1. If I have my final logistic regression model below,Logistic regression Number of obs = 189
    LR chi2(5) = 29.56
    Prob > chi2 = 0.0000
    Log likelihood = -102.55384 Pseudo R2 = 0.1260

    ------------------------------------------------------------------------------
    low | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    age | .9383918 .0332708 -1.79 0.073 .8753963 1.00592
    lwd | 2.54087 .9815007 2.41 0.016 1.191724 5.417377
    smoke | 1.585579 .5509269 1.33 0.185 .802469 3.132905
    ht | 4.017858 2.57528 2.17 0.030 1.143957 14.1117
    ptd | 4.322268 1.93573 3.27 0.001 1.796804 10.39735
    _cons | .8722474 .7224864 -0.17 0.869 .1720227 4.422763
    ------------------------------------------------------------------------------
    Note: _cons estimates baseline odds.


    2. and now I want to add interaction term between smoke and lwd
    • logistic low age smoke##lwd ht ptd
    Logistic regression Number of obs = 189
    LR chi2(6) = 32.20
    Prob > chi2 = 0.0000
    Log likelihood = -101.23846 Pseudo R2 = 0.1372

    ------------------------------------------------------------------------------
    low | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    age | .9433269 .0337749 -1.63 0.103 .8793985 1.011903

    smoke |
    smoker | 2.263877 .9304785 1.99 0.047 1.011579 5.066477
    1.lwd | 4.67193 2.53338 2.84 0.004 1.614089 13.52275
    |
    smoke#lwd
    smoker#1 | .2850451 .2207858 -1.62 0.105 .0624602 1.30084
    |
    ht | 3.719531 2.426126 2.01 0.044 1.035805 13.35668
    ptd | 4.002717 1.800033 3.08 0.002 1.657933 9.663683
    _cons | .6733606 .5741697 -0.46 0.643 .1266002 3.581468
    ------------------------------------------------------------------------------
    Note: _cons estimates baseline odds.

    3. Can I report from my first final model that lwd (OR 2.54), ht (OR 4.08) and ptd (OR 4.32) are the risk factors for low birth, and from my second model, can I just explain about the interaction between smoke and lwd only (OR 0.28)? or should I use the second model to be my final model and report the results from the second model? if then, how should I interpret smoker 1. lwd and smoke#lwd altogether? because in the first model, smoke wasn't a significant risk factor but in the second model it is significant.

    4. how to decide which interaction terms to include in a multivariate logistic regression model? which analysis should I run to choose interaction terms?

    Thank you for your time and help in advance.
    Last edited by Sam Lee; 28 Apr 2020, 17:59.

  • #2
    I recommend to use - margins- followed by - marginsplot- for that matter.
    Best regards,

    Marcos

    Comment


    • #3
      Thank you for your reply.

      If I want to see the interaction effect of smoking on lwd, can I add this term like below? or should I do this -logistic low age smoke##lwd ht ptd-?
      • logistic low smoke##lwd
      Logistic regression Number of obs = 189
      LR chi2(3) = 17.27
      Prob > chi2 = 0.0006
      Log likelihood = -108.70116 Pseudo R2 = 0.0736

      ------------------------------------------------------------------------------
      low | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      smoke |
      smoker | 2.972426 1.153821 2.81 0.005 1.388981 6.361009
      1.lwd | 6.039216 3.116229 3.49 0.000 2.196653 16.6035
      |
      smoke#lwd |
      smoker#1 | .1892393 .1390064 -2.27 0.023 .0448496 .7984804
      |
      _cons | .2207792 .0591633 -5.64 0.000 .1305743 .3733007
      ------------------------------------------------------------------------------
      Note: _cons estimates baseline odds.
      • . margins smoke#lwd, expression(exp(predict(xb)))
      Adjusted predictions Number of obs = 189
      Model VCE : OIM

      Expression : exp(predict(xb))

      ------------------------------------------------------------------------------
      | Delta-method
      | Margin Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      smoke#lwd |
      nonsmoker#0 | .2207792 .0591633 3.73 0.000 .1048213 .3367371
      nonsmoker#1 | 1.333333 .5879447 2.27 0.023 .1809828 2.485684
      smoker#0 | .65625 .1842988 3.56 0.000 .2950309 1.017469
      smoker#1 | .75 .3307189 2.27 0.023 .1018028 1.398197
      ------------------------------------------------------------------------------


      Is this the correct way to do it? how should I interpret these margins? Could you please show me the code (step-by-step)?

      Thank you,
      Last edited by Sam Lee; 28 Apr 2020, 18:45.

      Comment


      • #4
        This way, I believe you've got relative odds. If this is what you wish, OK.

        But there are many exemples of - margins - with interaction term in the Stata Manual. The examples 5 and 8 are what I usually use for that matter.
        Best regards,

        Marcos

        Comment

        Working...
        X