+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 20

Thread: Interaction effect in a logistic regression between cont and cat variables.

  1. #1
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Interaction effect in a logistic regression between cont and cat variables.




    Hi guys,

    I am conducting a logistic regression on whether a participants test positive or not to HIV (1=positive; 0 Negative) in a sample of transgender people. I have two independent variables Sw sex workers (yes or not) and number of sex partners (NsexP).

    When I run the logistic regression on HIV status and sex worker (SW) I obtain a significant p value. Sex workers have twice the odds to be HIV positive than non-sex workers. When I include the number of sex partners variable into the regression the Odds of SW increase considerably to OR 4.0.

    How can I interpret this increase in the OR in the SW variable. I was wonder if there could be an interaction effect or suppressor effect between SW and NsexP

    thank in advance!
    MArvin

  2. #2
    Omega Contributor
    Points: 38,374, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,998
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: Interaction effect in a logistic regression between cont and cat variables.

    You can introduce a new variable to your model (SW times number of partners). You would keep both SW and # of partners in the model, but also add a variable that is their product. If this new variable is a significant predictor, then you have interaction.
    Stop cowardice, ban guns!

  3. The Following User Says Thank You to hlsmith For This Useful Post:

    Marvin85 (04-17-2013)

  4. #3
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Re: Interaction effect in a logistic regression between cont and cat variables.

    Thank you for your prompt response. I will try it in Stata. Thank you!

  5. #4
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Re: Interaction effect in a logistic regression between cont and cat variables.

    The interaction effect SW*NsexP is not significant. the OR of Sex worker is 2.4 alone but when I introduce number of sex partner increase to 4.8. And the effect of number of sex partners is not significant >0.05; OR 0.97. Do you have any idea of what would be going on here??

  6. #5
    Fortran must die
    Points: 58,790, Level: 100
    Level completed: 0%, Points required for next Level: 0
    noetsi's Avatar
    Posts
    6,532
    Thanks
    692
    Thanked 915 Times in 874 Posts

    Re: Interaction effect in a logistic regression between cont and cat variables.

    To me, given the lack of interaction, this suggest that the new variable is playing a moderating role and that Sex Worker has an indirect effect on HIV through Sex partner. Logistic regression does not, I believe, model indirect effects. To test this you would have to run something like structural equation models and determine what the indirect effect is (assuming there is one).

    I know little about moderators in regression, so there may be a simpler solution than that.
    "Very few theories have been abandoned because they were found to be invalid on the basis of empirical evidence...." Spanos, 1995

  7. The Following User Says Thank You to noetsi For This Useful Post:

    Marvin85 (04-17-2013)

  8. #6
    TS Contributor
    Points: 17,779, Level: 84
    Level completed: 86%, Points required for next Level: 71
    Karabiner's Avatar
    Location
    FC Schalke 04, Germany
    Posts
    2,542
    Thanks
    56
    Thanked 640 Times in 602 Posts

    Re: Interaction effect in a logistic regression between cont and cat variables.

    If a predictor is not related to the dependent variable but is substantially
    correlated with another predictor, the prediction can markedly improve.
    At least in linear regression models. The term for this is suppressor effect.

    With kind regards

    K.

  9. The Following User Says Thank You to Karabiner For This Useful Post:

    Marvin85 (04-24-2013)

  10. #7
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Re: Interaction effect in a logistic regression between cont and cat variables.

    Thank you Karabiner. So do you know how can I do this in stata?

  11. #8
    Fortran must die
    Points: 58,790, Level: 100
    Level completed: 0%, Points required for next Level: 0
    noetsi's Avatar
    Posts
    6,532
    Thanks
    692
    Thanked 915 Times in 874 Posts

    Re: Interaction effect in a logistic regression between cont and cat variables.

    Quote Originally Posted by Karabiner View Post
    If a predictor is not related to the dependent variable but is substantially
    correlated with another predictor, the prediction can markedly improve.
    At least in linear regression models. The term for this is suppressor effect.

    With kind regards

    K.
    Do you mean markedly improve when its added to the model (the suppressor variable) or removed from the model?
    "Very few theories have been abandoned because they were found to be invalid on the basis of empirical evidence...." Spanos, 1995

  12. #9
    Points: 119, Level: 2
    Level completed: 38%, Points required for next Level: 31

    Location
    Durham, NC
    Posts
    17
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Interaction effect in a logistic regression between cont and cat variables.

    My thought on this is that if you had a priori reason to believe that the number of sex partners influences the chance of testing positive for HIV, you should keep it in the model, even if its not significant. I know people that would drop it, but I prefer using your knowledge of the system to guide statistics more often than the other way around. With sex partners in the model, the significance of the sex worker effect is over and above whatever can be explained by the number of partners, like type 3 sums of squares in ANOVA (although I am not sure if it's exactly the same in logistic regression based on maximum likelihoods). You can think of the OR of 4.8 as the effect after the number partners effect has been removed. Although it can depend on the specifics of your study, I would see 4.8 as better estimate because you accounted for the other predictor.

  13. The Following User Says Thank You to Tarek For This Useful Post:

    Marvin85 (04-25-2013)

  14. #10
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Re: Interaction effect in a logistic regression between cont and cat variables.

    So Number of sexual partners plays a suppressor/moderating role in the interaction between SW (sexual worker) and HIV? I just would like to understand the logic if this regression to be able to explain it to my supervisor and to a not statistical experience audience.

    1. So when I regress HIV (DV), SW(IV) controlling for Number of sexual Partners (IV), the effect of SW means that I am compering Sex workers vs not sex workers with the same number of sexual partners right? For example, I am comparing a sexual workers vs a non-sexual workers with 20 sexual partners each so the effect of sexual partners is canceled/ controlled; is this statement correct?
    2. Seeing this from another perspective, number of sexual partners among this community does not influence participants likelihood to have HIV when controlling for sex workers status. How can I interpret this? Perhaps, This means the numbers of sexual partners a participant has not predict HIV status if he/she is a sex worker? This will be the same for participants who are not sex workers?

    Thank you in advance. I would like to make a case with this information and perhaps write a manuscript.

    Best,
    Marvin

  15. #11
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Re: Interaction effect in a logistic regression between cont and cat variables.

    Any one please!!!!

  16. #12
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Re: Interaction effect in a logistic regression between cont and cat variables.

    So Number of sexual partners plays a suppressor/moderating role in the interaction between SW (sexual worker) and HIV? I just would like to understand the logic if this regression to be able to explain it to my supervisor and to a not statistical experience audience.

    1. So when I regress HIV (DV), SW(IV) controlling for Number of sexual Partners (IV), the effect of SW means that I am compering Sex workers vs not sex workers with the same number of sexual partners right? For example, I am comparing a sexual workers vs a non-sexual workers with 20 sexual partners each so the effect of sexual partners is canceled/ controlled; is this statement correct?
    2. Seeing this from another perspective, number of sexual partners among this community does not influence participants likelihood to have HIV when controlling for sex workers status. How can I interpret this? Perhaps, This means the numbers of sexual partners a participant has not predict HIV status if he/she is a sex worker? This will be the same for participants who are not sex workers?

    Thank you in advance. I would like to make a case with this information and perhaps write a manuscript.

    Best,
    Marvin

  17. #13
    Points: 119, Level: 2
    Level completed: 38%, Points required for next Level: 31

    Location
    Durham, NC
    Posts
    17
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Interaction effect in a logistic regression between cont and cat variables.

    1. Yes. To illustrate this to yourself, try this: do a simple linear regression (not logistic) of hiv onto # sex partners and output the residuals. Then do a second simple linear regression (actually ANOVA, again not logistic) of the residuals onto sex worker status. What you will see in this second analysis is the effect of sex worker on HIV status after you have removed all the variation you can due to the linear effect of # sex partners. The output of this analysis will not be technically valid because the binary response variable will prevent you from meeting the assumptions of general linear models. But in many cases, the results will be similar to the logistic regression results and might be easier to wrap your head around. This is effectively what a "type3" or "partial" sums of squares tells you: the effect of X1 on Y after the effects of X2 have been controlled for. In your case, I believe it's like comparing sex worker status among individuals that all have the mean number of sex partners.
    2. " number of sexual partners among this community does not influence participants likelihood to have HIV when controlling for sex workers status"<--yes, that's my interpretation too. But how to fully interpret this beyond the statistical output, that is, in the context of the sociological question you are asking? That is a great question to discuss with your PI/supervisor. I find that those conversations that start from the statistical analysis output and attempt to answer "what does this really mean?" are some of the most exciting parts of research. For me, they have been a great way for me to learn from researchers that have much more experience than I have in my own field. So keep in mind that some questions are not helped by more statistical tool use as much as from knowledge of your research system/field.

  18. #14
    Fortran must die
    Points: 58,790, Level: 100
    Level completed: 0%, Points required for next Level: 0
    noetsi's Avatar
    Posts
    6,532
    Thanks
    692
    Thanked 915 Times in 874 Posts

    Re: Interaction effect in a logistic regression between cont and cat variables.

    Is centering strongly recommended when adding interaction terms? I had no heard that.

    As I understand it centering changes the definition of the intercept which is obviously important if you work with categorical variables (as I normally do).
    "Very few theories have been abandoned because they were found to be invalid on the basis of empirical evidence...." Spanos, 1995

  19. #15
    Fortran must die
    Points: 58,790, Level: 100
    Level completed: 0%, Points required for next Level: 0
    noetsi's Avatar
    Posts
    6,532
    Thanks
    692
    Thanked 915 Times in 874 Posts

    Re: Interaction effect in a logistic regression between cont and cat variables.


    It sounds to me that it would be simpler to run a VIF or tolerance test and if they don't show MC not to worry about centering.

    Here is a different question on interaction. Say you have the following
    Y=B0 +B1X1 + B2X2 +B3X3 + B4X1X2...

    And this was the correct model, that is variable 3 was not involved in an interaction. When you analyze the effects of B1 at specific levels of B2 (simple effects) do you still have to analyze it at specific levels of B3 -as with a three way interaction or not?

    I don't think so, but I ran across a reference that made me think you might.
    "Very few theories have been abandoned because they were found to be invalid on the basis of empirical evidence...." Spanos, 1995

+ Reply to Thread
Page 1 of 2 1 2 LastLast

           




Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats