Announcement

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

  • Interaction of two continous variables, difficulty with interpreting

    Hi Statalist,

    I’m working with a logistic regression model, and I'm struggling with the interpretation of an interaction term between Cultural distance and Rule of law in predicting alliance governance (1 = joint venture, 0 = strategic alliance).

    In my model:
    • Cultural distance has a positive effect. (without the inclusion of the interaction term)
    • Rule of law has a negative effect. (without the inclusion of the interaction term)
    These are finding are both in line with what I expected.

    For the interaction term my initial expectation was that distance's effect would diminish with higher rule of law (i.e., the positve effect of Cultural distance would be moderated by higher levels of rule of law). However, when I compute coefficients, I find that the coefficient for the interaction term is positive and signiicant.

    I’m trying to understand whether this positive interaction term means that the effect of cultural distance becomes more positve at higher levels of Rule of law (rather than less positive) impact, or if it implies something else entirely.

    I also thought of the possibility that the positve interaction term would imply the negative effect of Rule of law would become less negative at higher levels of Cultural distance. Therefore I plotted the efffect of Cultural distance (distc) at different levels of Rule of law (regqc) in the figure wt the top, and the effect of Rule of law (regqc) at different levels of Cultural distance (distc) in the figure on the bottom.

    Note that the variables are centered, which leads to validity of negative values for Cultural distance, and Rule of Law.
    Click image for larger version

Name:	x distc.png
Views:	1
Size:	39.9 KB
ID:	1765983

    Click image for larger version

Name:	x regqc.png
Views:	1
Size:	38.3 KB
ID:	1765984




    Could anyone help me understand what is happening here and how I can interpret the graphs. Furthremore, any advice on interpreting this interaction would be greatly appreciated!

    Thanks in advance!
    Last edited by Albert Heijn; 18 Oct 2024, 05:29.

  • #2
    not sure how you've gotten the margins, but try something like this.

    Code:
    sysuse auto, clear
    drop if mi(rep78)
    
    reg price weight mpg c.weight#c.mpg
    margins, dydx(weight) over(mpg)
    marginsplot

    Comment


    • #3
      Thank you for your reply.

      I got hese margins through the following code:

      margins, at(distc=(-2(3)4) regqc=(-4(3)2)) predict(xb)
      marginsplot, xdimension(distc) recast(line)
      marginsplot, xdimension(regqc) recast(line)

      This code should provide the log odds, which was advised to me since I'm using oods-ratios as coefficients.


      The code you provided does not work for me due to negative values, but the following code I used provided the same figures, with the only differences being that the y-axis now reads predicted probabilities rahter than log-odds:

      margins, at(distc=(-2(3)4) regqc=(-4(3)2))
      marginsplot, xdimension(distc) recast(line)
      marginsplot, xdimension(regqc) recast(line)
      Click image for larger version

Name:	pred prob.png
Views:	1
Size:	30.3 KB
ID:	1766007


      Is the problem you see with the graph itself, or with the y-axis.

      Thanks in advance.
      Last edited by Albert Heijn; 18 Oct 2024, 10:41.

      Comment


      • #4
        margins, dydx(distc) at(regqc=(-4(1)2))

        Comment


        • #5
          All the graphs you show are consistent with the regression and margins outputs you describe. And your interpretation of them is quite correct.

          You can see in the graph in #3 that as regqc increases from -4 through -1 to +2, the slope of the Pr(jv):distc line goes from moderately negative to slightly positive and then on to moderately positive. That is precisely what one expects to see with a positive interaction coefficient.

          I guess the question you need to ponder now is why your interaction results are opposite of what you expected. I suggest starting that exploration by reviewing why you expected a negative interaction coefficient. If you started from a theory that is well-supported by a large body of high-quality studies that pretty consistently support it, then I would focus on whether there are problems in your own methodology. Is your data set properly sampled? Is there something about the way you accrued your data that might have produced a sample with unusual relationships among these variables? Or perhaps you sampled from a population that is materially different from that in which the theory was developed, and the theory just doesn't apply. Are the data correct: did you ascertain the values of all the variables correctly? Did something in the data management mangle those variables?

          If your basis for expecting a negative interaction coefficient is based on a theory that has only a handful of supporting studies, or only studies of poor quality, then perhaps you are simply finding that the theory is wrong, or is of limited applicability. There are many theories that rest on irreproducible studies in the peer-reviewed literature.

          Comment


          • #6
            I agree with Clyde in all respects (and was getting to that), but I was thinking a different margins command might give you a cleaner visual that tracks the slope over reggc rather than having multiple lines (though they both tell you the same thing).

            You are also using a non-linear model. This requires some thought.

            First, the effect of one variable already depends on the other even without the interaction. You might do better to get the margins over the other variable without the interaction.
            HTML Code:
            https://www.stata.com/statalist/archive/2013-01/msg00293.html
            .

            Code:
            sysuse auto, clear
            
            logit foreign weight mpg 
            margins, dydx(weight) at(mpg=(12(1)42))
            marginsplot
            
            logit foreign weight mpg c.weight#c.mpg
            margins, dydx(weight) at(mpg=(12(1)42))
            marginsplot
            Second, interaction terms in non-linear models can be tricky to interpret
            HTML Code:
            https://journals.sagepub.com/doi/pdf/10.1177/1536867X1001000211
            HTML Code:
            https://pmc.ncbi.nlm.nih.gov/articles/PMC3447245/
            . There's a program that computes them,, though some people have complained about it, including Richard Williams
            HTML Code:
            https://www.statalist.org/forums/forum/general-stata-discussion/general/6857-inteff-versus-margins
            .
            Code:
            search inteff
            You might also run the model by LPM and see what you get.

            Comment

            Working...
            X