Announcement

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

  • 'Effect on Marginal Predicted Mean' in marginsplot

    Click image for larger version

Name:	test.png
Views:	0
Size:	0
ID:	1722735
    After running a multi-level logit regression that includes a continuous-by-continuous interaction, I want to visualize the results. I wonder how the effect can best be visualized and interpreted. Here is some example data:
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input double(inctxff eduyrs unemp_gen_12mo) long gndr double(agea chldhhe green_skills gdp_pc carbonprice_share) long cntry
    1 14 67 1 47 2 0 70867.3609970749 44.12539 18
    1 19 67 2 56 1 0 70867.3609970749 44.12539 18
    0 16 67 2 25 2 0 70867.3609970749 44.12539 18
    1 14 67 1 65 2 0 70867.3609970749 44.12539 18
    1 15 67 2 59 1 0 70867.3609970749 44.12539 18
    end
    label values gndr gndr
    label def gndr 1 "1", modify
    label def gndr 2 "2", modify
    label values cntry cntry
    label def cntry 18 "NOR", modify
    Here is the regression code:
    Code:
    melogit inctxff c.eduyrs##c.unemp_gen_12mo i.gndr c.agea c.chldhhe c.green_skills c.gdp_pc c.carbonprice_share || cntry: eduyrs, or
    To improve interpretability of the interaction, I want to estimate and visualize marginal effects. I fix predictor 1 (eduyrs) at its mean value, let values of x2 (unemp_gen_12mo) vary and seek to show how this affects the prediction of x1(eduyrs) on Y(inctxff). Covariates are fixed at their means.

    Code:
    margins, dydx(eduyrs) at(unemp_gen_12mo=(15(15)90)) atmeans
    marginsplot
    The resulting plot shows the "Effect on Marginal Predicted Mean"? What does this mean? I have attached the resulting plot below.
    Attached Files
    Last edited by Otto Meyer; 03 Aug 2023, 07:27.

  • #2
    It seems the graph hasn't uploaded. Here it is:
    Click image for larger version

Name:	test.png
Views:	1
Size:	91.7 KB
ID:	1722758

    Comment

    Working...
    X