Announcement

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

  • Understanding margins plots for three-way continuous interactions in non-linear models

    I am looking for help in interpreting a margins plot for a three-way interaction among continuous variables in a conditional logit model. Despite discussions with colleagues, we have not reached a consensus.

    I am estimating a conditional logit model to examine the probability that an investor chooses a particular region for investment, based on the region's industry activity.

    The baseline hypothesis (supported) is that greater industry-specific activity in a region increases the likelihood that an investor from the same industry will choose that region.

    A second hypothesis (also supported) posits that this positive relationship is strengthened by the normative strength (i.e., the strength of norms and rules) within the region. The margins plot (see below) shows that as normative strength increases, the average marginal effect of industry activity on the probability of choosing a region also goes up.

    Click image for larger version

Name:	norm_str_dydx_Statalist.png
Views:	1
Size:	71.2 KB
ID:	1763707

    A third hypothesis involves a three-way interaction. It posits that the interaction effect between regional industry activity and normative strength is more pronounced for investors with limited resource availability. In simpler terms, investors with fewer resources are more sensitive to greater normative strength than investors with more abundant resources.

    In the margins plot (see below), as investor resources decrease, the margin lines are higher. The lines correspond to low (mean - 1 SD) and high (mean + 1 SD) levels of resource availability. The margins appear to be parallel, with non-overlapping confidence intervals.

    Click image for larger version

Name:	norm_str_res_av_dydx_Statalist.png
Views:	1
Size:	81.6 KB
ID:	1763709

    Now, my question is, for the three-way interaction to be supported, is it sufficient that the lines are apart with non-overlapping confidence intervals, or should the upper lines (representing lower resource availability) also have a steeper slope than the lower lines?

    If the latter is required, how is it possible for the upper lines, corresponding to progressively lower levels of resources, to continue increasing in slope without becoming implausibly steep? Does this imply that significant three-way interactions are unlikely to occur over the entire range of the second moderator?

    Finally, if the margins lines need to have different slopes, how can one test this in non-linear models where the slope of the margin is not constant? Although this is not strictly a Stata question, I believe it may be useful for those estimating three-way continuous interactions in non-linear models.

    Thank you for any insights you can provide.

    P.S. In the next post I am including a simplified version of the code used to estimate the model and create the plots.
    Last edited by Riccardo Valboni; 13 Sep 2024, 08:13.

  • #2
    Code:
     
    * MODEL
     
    clogit Region c.IndustryActivity##c.NormativeStrength##c.ResourceAvailability Controls, group(InvestmentID)
    estimates store m1
     
    qui sum NormativeStrength if e(sample)
    global norm_str_min=r(min)
    global norm_str_max=r(max)
                   
    qui sum ResourceAvailability if e(sample)
    global res_av_low=r(mean)-r(sd)
    global res_av_high=r(mean)+r(sd)
     
    * TWO-WAY INTERACTION MARGINS PLOT
     
    estimates restore m1
    margins, dydx(IndustryActivity) at(NormativeStrength =($norm_str_min(1)$norm_str_max)) post
     
    marginsplot, xtitle("Normative strength", bmargin(small)) xscale(range($norm_str_min  $norm_str_max)) xlabel($norm_str_min(1)$norm_str_max, grid glpattern(dot) glcolor(gs9) glwidth(thin) labsize(small)) ylabel(, grid glpattern(dot) glcolor(gs9) glwidth(thin) labsize(small)) title("") ytitle("AME of regional industry activity") graphregion(color(white)) plotregion(lcolor(none)) plot1opts(lpattern(solid) lwidth(medthin) lcolor(gs5) msymbol(circle) msize(vsmall) mcolor(gs5)) recastci(rarea) ci1opts(lwidth(none) acolor(gs10%30)) saving(norm_str_dydx)
    graph export norm_str_dydx.png, width(800) height(600)
     
    * THREE-WAY INTERACTION MARGINS PLOT
     
    estimates restore m1
    margins, dydx(IndustryActivity) at(NormativeStrength =($norm_str_min(1)$norm_str_max)) ResourceAvailability =($res_av_low $res_av_high)) post
     
    marginsplot, xtitle("Normative strenght", bmargin(small)) xscale(range($norm_str_min  $norm_str_max)) xlabel($norm_str_min(1)$norm_str_max, grid glpattern(dot) glcolor(gs9) glwidth(thin) labsize(small)) ylabel(, grid glpattern(dot) glcolor(gs9) glwidth(thin) labsize(small)) title("") ytitle("AME of regional industry activity") graphregion(color(white)) plotregion(lcolor(none)) plot1opts(lpattern(solid) lwidth(medthin) lcolor(gs5) msymbol(circle) msize(vsmall) mcolor(gs5)) plot2opts(lpattern(dash) lwidth(medthin) lcolor(gs5) msymbol(triangle) msize(vsmall) mcolor(gs5)) recastci(rarea) ci1opts(lwidth(none) acolor(gs10%30)) ci2opts(lwidth(none) acolor(gs10%30))  legend(order(3 "Low resource availability" 4 "High resource availability ") size(*0.8) rows(2)) saving(norm_str_res_av_dydx)
    graph export norm_str_res_av_dydx.png, width(800) height(600)

    Comment


    • #3
      Apologies for the long post. I just wanted to add some additional evidence to my previous question. I created a 3D margins plot (here below) using the Stata-Python interface, showing that the average marginal effect of regional industry activity increases along both the first and second moderators.

      In addition, in the second margins plot above, the difference between the margins for low and high resource availability appears to result in a positively inclined and still statistically significant line across the entire range of normative strength.

      However, I am unsure if these last two pieces of evidence are sufficient to demonstrate support for the existence of the three-way interaction effect.

      Any insights or suggestions are greatly appreciated. Thanks!
      Click image for larger version

Name:	Margins3d.png
Views:	1
Size:	1.68 MB
ID:	1764081

      Comment

      Working...
      X