Announcement

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

  • Logistic Regression with Interaction

    Hello everyone,

    I wanted to ask one question regarding a logistic regression model I am fitting in Stata 17. My model is as follows:

    Code:
    logistic overreport_dummy i.empathy i.specific i.specific#i.empathy, robust
    where overreport_dummy is a dummy variable with two values 0 and 1. The same for variables empathy and specific.

    Below are the results I obtained.

    Click image for larger version

Name:	Screenshot 2024-04-14 at 5.29.12 PM.png
Views:	1
Size:	40.2 KB
ID:	1749931


    The p-value of the interaction term is 0.083, and I am interested in further examining the effects of empathy at each level/value of specific. So I used the following command:
    Code:
    margins specific#empathy, atmeans
    The results are as follows:

    Click image for larger version

Name:	Screenshot 2024-04-14 at 5.27.57 PM.png
Views:	1
Size:	29.9 KB
ID:	1749932

    My question: is there a way in Stata to test whether the effect of empathy on each level of specific is significant or not? For example, when specific = 1, how to know if the odds ratio is significantly different between when empathy = 1 and when empathy = 0?

    Since I don't have a main effect of empathy or specific, I really want to be careful when I interpret my data. Thank you very much for your help and time!
    Attached Files

  • #2
    For example, when specific = 1, how to know if the odds ratio is significantly different between when empathy = 1 and when empathy = 0?
    That's already in the output of the regression itself. The ratio of the odds ratios for specific (1 vs 0) when empathy = 1 vs empathy = 0 is 0.106 (to three decimal places). Its 95% CI is from 0.008 to 1.343, so you can say that the odds ratios conditional on the values of empathy may or may not be much different from each other, and the data don't even tell you which one is bigger than the other. It's about as inconclusive as you can get.

    My question: is there a way in Stata to test whether the effect of empathy on each level of specific is significant or not?

    That's actually a very different question. To get the actual value of the odds ratios for specific when empathy = 1 and when empathy = 0:
    Code:
    forvalues e = 0/1 {
        display "Odds ratio for specific when empathy = `e'"
        lincom 1.specific + `e'.empathy#1.specific, or
    }
    Given that you asked the two questions in a way that suggests you thought they were the same question, let me caution you also not to fall into the trap of thinking that if one of the two odds ratios turns out to be "statistically significant" and the other does not, then that means the two odds ratios are statistically significantly different. That is a fallacy. The difference between "statistically significant" and "not statistically significant" is not itself "statistically significant."

    Comment

    Working...
    X