Announcement

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

  • Margins for Interaction Term

    I have run the following regression and am trying to analyse whether the initial level of Income of a country affects changes the effect of inequality on growth (i.e the relationship could be non-linear among developed and developing countries). I have included an interaction term to do this which shows that as inequality is negative and the interaction term is positive, inequality negatively affects the growth of a country with lower initial income.

    However, I am trying to find if this weakens as the income per capita increases or turns positive for higher income countries and hence believe the
    Code:
    margins
    command is appropriate. But, I am unsure of the code required for this. i have the following:

    Code:
    . xtdpdgmm growth_rate c.l.gini_disp##c.l.ln_Income l.EFW l.ln_pl_i l.fyr_sch_sec l.myr_sch_sec,
    >  model(fod) gmm(l.(c.gini_disp##c.ln_Income EFW ln_pl_i fyr_sch_sec myr_sch_sec), lag(0 0)) gm
    > m(l.(c.gini_disp##c.ln_Income EFW ln_pl_i fyr_sch_sec myr_sch_sec), lag(0 0) diff model(level)
    > ) two w(ind) teffects
    note: standard errors can be severely biased in finite samples
    
    Generalized method of moments estimation
    
    Fitting full model:
    Step 1         f(b) =  .00142514
    Step 2         f(b) =  .88647575
    
    Group variable: ncountry                     Number of obs         =       708
    Time variable: period                        Number of groups      =       112
    
    Moment conditions:     linear =     156      Obs per group:    min =         1
                        nonlinear =       0                        avg =  6.321429
                            total =     156                        max =        11
    
    -------------------------------------------------------------------------------------------
                  growth_rate |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    --------------------------+----------------------------------------------------------------
                    gini_disp |
                          L1. |  -.0092847   .0008463   -10.97   0.000    -.0109434    -.007626
                              |
                    ln_Income |
                          L1. |  -.0522122   .0039198   -13.32   0.000    -.0598949   -.0445296
                              |
    cL.gini_disp#cL.ln_Income |   .0009942    .000096    10.36   0.000     .0008062    .0011823
                              |
                          EFW |
                          L1. |   .0078056   .0006158    12.68   0.000     .0065987    .0090124
                              |
                      ln_pl_i |
                          L1. |  -.0054779   .0009282    -5.90   0.000    -.0072971   -.0036586
                              |
                  fyr_sch_sec |
                          L1. |   .0001479   .0015346     0.10   0.923    -.0028598    .0031556
                              |
                  myr_sch_sec |
                          L1. |   .0119233   .0016257     7.33   0.000      .008737    .0151097
                              |
                       period |
                        1970  |   .0047695   .0008684     5.49   0.000     .0030676    .0064715
                        1975  |  -.0028515   .0012079    -2.36   0.018    -.0052189    -.000484
                        1980  |  -.0152241   .0011472   -13.27   0.000    -.0174725   -.0129757
                        1985  |  -.0064175   .0021772    -2.95   0.003    -.0106847   -.0021503
                        1990  |  -.0024537   .0019021    -1.29   0.197    -.0061817    .0012744
                        1995  |  -.0099781   .0023262    -4.29   0.000    -.0145373   -.0054189
                        2000  |   -.017659   .0021014    -8.40   0.000    -.0217777   -.0135404
                        2005  |  -.0088494   .0021685    -4.08   0.000    -.0130995   -.0045992
                        2010  |   -.013366   .0027469    -4.87   0.000    -.0187499   -.0079821
                        2015  |  -.0326874   .0030746   -10.63   0.000    -.0387135   -.0266612
                              |
                        _cons |   .4437157   .0332909    13.33   0.000     .3784667    .5089647
    -------------------------------------------------------------------------------------------
    Instruments corresponding to the linear moment conditions:
     1, model(fodev):
       1965:L.gini_disp 1970:L.gini_disp 1975:L.gini_disp 1980:L.gini_disp
       1985:L.gini_disp 1990:L.gini_disp 1995:L.gini_disp 2000:L.gini_disp
       2005:L.gini_disp 2010:L.gini_disp 2020:L.gini_disp 2025:L.gini_disp
       1965:L.ln_Income 1970:L.ln_Income 1975:L.ln_Income 1980:L.ln_Income
       1985:L.ln_Income 1990:L.ln_Income 1995:L.ln_Income 2000:L.ln_Income
       2010:L.ln_Income 2015:L.ln_Income 2020:L.ln_Income 2025:L.ln_Income
       1965:cL.gini_disp#cL.ln_Income 1970:cL.gini_disp#cL.ln_Income
       1975:cL.gini_disp#cL.ln_Income 1980:cL.gini_disp#cL.ln_Income
       1985:cL.gini_disp#cL.ln_Income 1990:cL.gini_disp#cL.ln_Income
       2000:cL.gini_disp#cL.ln_Income 2005:cL.gini_disp#cL.ln_Income
       2010:cL.gini_disp#cL.ln_Income 2015:cL.gini_disp#cL.ln_Income
       2020:cL.gini_disp#cL.ln_Income 2025:cL.gini_disp#cL.ln_Income 1965:L.EFW
       1970:L.EFW 1975:L.EFW 1980:L.EFW 1990:L.EFW 1995:L.EFW 2000:L.EFW
       2005:L.EFW 2010:L.EFW 2015:L.EFW 2020:L.EFW 2025:L.EFW 1965:L.ln_pl_i
       1970:L.ln_pl_i 1980:L.ln_pl_i 1985:L.ln_pl_i 1990:L.ln_pl_i 1995:L.ln_pl_i
       2000:L.ln_pl_i 2005:L.ln_pl_i 2010:L.ln_pl_i 2015:L.ln_pl_i 2020:L.ln_pl_i
       2025:L.ln_pl_i 1970:L.fyr_sch_sec 1975:L.fyr_sch_sec 1980:L.fyr_sch_sec
       1985:L.fyr_sch_sec 1990:L.fyr_sch_sec 1995:L.fyr_sch_sec 2000:L.fyr_sch_sec
       2005:L.fyr_sch_sec 2010:L.fyr_sch_sec 2015:L.fyr_sch_sec
     2, model(level):
       1970:D.L.gini_disp 1975:D.L.gini_disp 1980:D.L.gini_disp 1985:D.L.gini_disp
       1990:D.L.gini_disp 1995:D.L.gini_disp 2000:D.L.gini_disp 2005:D.L.gini_disp
       2010:D.L.gini_disp 2015:D.L.gini_disp 2020:D.L.gini_disp 2025:D.L.gini_disp
       1965:D.L.ln_Income 1970:D.L.ln_Income 1975:D.L.ln_Income 1980:D.L.ln_Income
       1985:D.L.ln_Income 1990:D.L.ln_Income 1995:D.L.ln_Income 2000:D.L.ln_Income
       2005:D.L.ln_Income 2015:D.L.ln_Income 2020:D.L.ln_Income 2025:D.L.ln_Income
       1965:D.cL.gini_disp#cL.ln_Income 1970:D.cL.gini_disp#cL.ln_Income
       1975:D.cL.gini_disp#cL.ln_Income 1980:D.cL.gini_disp#cL.ln_Income
       1985:D.cL.gini_disp#cL.ln_Income 1990:D.cL.gini_disp#cL.ln_Income
       1995:D.cL.gini_disp#cL.ln_Income 2000:D.cL.gini_disp#cL.ln_Income
       2005:D.cL.gini_disp#cL.ln_Income 2010:D.cL.gini_disp#cL.ln_Income
       2015:D.cL.gini_disp#cL.ln_Income 2020:D.cL.gini_disp#cL.ln_Income
       2025:D.cL.gini_disp#cL.ln_Income 1965:D.L.EFW 1970:D.L.EFW 1975:D.L.EFW
       1980:D.L.EFW 1985:D.L.EFW 1990:D.L.EFW 1995:D.L.EFW 2000:D.L.EFW
       2005:D.L.EFW 2010:D.L.EFW 2015:D.L.EFW 2020:D.L.EFW 2025:D.L.EFW
       1965:D.L.ln_pl_i 1970:D.L.ln_pl_i 1975:D.L.ln_pl_i 1980:D.L.ln_pl_i
       1985:D.L.ln_pl_i 1990:D.L.ln_pl_i 1995:D.L.ln_pl_i 2000:D.L.ln_pl_i
       2005:D.L.ln_pl_i 2010:D.L.ln_pl_i 2015:D.L.ln_pl_i 2020:D.L.ln_pl_i
       2025:D.L.ln_pl_i 1965:D.L.fyr_sch_sec 1970:D.L.fyr_sch_sec
       1975:D.L.fyr_sch_sec 1980:D.L.fyr_sch_sec 1985:D.L.fyr_sch_sec
       1990:D.L.fyr_sch_sec 1995:D.L.fyr_sch_sec 2000:D.L.fyr_sch_sec
       2005:D.L.fyr_sch_sec 2010:D.L.fyr_sch_sec 2015:D.L.fyr_sch_sec
       2020:D.L.fyr_sch_sec
     3, model(level):
       1970bn.period 1975.period 1980.period 1985.period 1990.period 1995.period
       2000.period 2005.period 2010.period 2015.period
     4, model(level):
       _cons
    Code:
    . margins, dydx(l.gini_disp) at(l.ln_Income = (0(0.1)10))
    
    Average marginal effects                        Number of obs     =        708
    Model VCE    : Conventional
    
    Expression   : Linear prediction, predict()
    dy/dx w.r.t. : L.gini_disp
    
    1._at        : L.ln_Income     =           0
    
    2._at        : L.ln_Income     =          .1
    
    3._at        : L.ln_Income     =          .2
    
    4._at        : L.ln_Income     =          .3
    
    5._at        : L.ln_Income     =          .4
    
    6._at        : L.ln_Income     =          .5
    
    7._at        : L.ln_Income     =          .6
    
    8._at        : L.ln_Income     =          .7
    
    9._at        : L.ln_Income     =          .8
    
    10._at       : L.ln_Income     =          .9
    
    11._at       : L.ln_Income     =           1
    
    12._at       : L.ln_Income     =         1.1
    
    13._at       : L.ln_Income     =         1.2
    
    14._at       : L.ln_Income     =         1.3
    
    15._at       : L.ln_Income     =         1.4
    
    16._at       : L.ln_Income     =         1.5
    
    17._at       : L.ln_Income     =         1.6
    
    18._at       : L.ln_Income     =         1.7
    
    19._at       : L.ln_Income     =         1.8
    
    20._at       : L.ln_Income     =         1.9
    
    21._at       : L.ln_Income     =           2
    
    22._at       : L.ln_Income     =         2.1
    
    23._at       : L.ln_Income     =         2.2
    
    24._at       : L.ln_Income     =         2.3
    
    25._at       : L.ln_Income     =         2.4
    
    26._at       : L.ln_Income     =         2.5
    
    27._at       : L.ln_Income     =         2.6
    
    28._at       : L.ln_Income     =         2.7
    
    29._at       : L.ln_Income     =         2.8
    
    30._at       : L.ln_Income     =         2.9
    
    31._at       : L.ln_Income     =           3
    
    32._at       : L.ln_Income     =         3.1
    
    33._at       : L.ln_Income     =         3.2
    
    34._at       : L.ln_Income     =         3.3
    
    35._at       : L.ln_Income     =         3.4
    
    36._at       : L.ln_Income     =         3.5
    
    37._at       : L.ln_Income     =         3.6
    
    38._at       : L.ln_Income     =         3.7
    
    39._at       : L.ln_Income     =         3.8
    
    40._at       : L.ln_Income     =         3.9
    
    41._at       : L.ln_Income     =           4
    
    42._at       : L.ln_Income     =         4.1
    
    43._at       : L.ln_Income     =         4.2
    
    44._at       : L.ln_Income     =         4.3
    
    45._at       : L.ln_Income     =         4.4
    
    46._at       : L.ln_Income     =         4.5
    
    47._at       : L.ln_Income     =         4.6
    
    48._at       : L.ln_Income     =         4.7
    
    49._at       : L.ln_Income     =         4.8
    
    50._at       : L.ln_Income     =         4.9
    
    51._at       : L.ln_Income     =           5
    
    52._at       : L.ln_Income     =         5.1
    
    53._at       : L.ln_Income     =         5.2
    
    54._at       : L.ln_Income     =         5.3
    
    55._at       : L.ln_Income     =         5.4
    
    56._at       : L.ln_Income     =         5.5
    
    57._at       : L.ln_Income     =         5.6
    
    58._at       : L.ln_Income     =         5.7
    
    59._at       : L.ln_Income     =         5.8
    
    60._at       : L.ln_Income     =         5.9
    
    61._at       : L.ln_Income     =           6
    
    62._at       : L.ln_Income     =         6.1
    
    63._at       : L.ln_Income     =         6.2
    
    64._at       : L.ln_Income     =         6.3
    
    65._at       : L.ln_Income     =         6.4
    
    66._at       : L.ln_Income     =         6.5
    
    67._at       : L.ln_Income     =         6.6
    
    68._at       : L.ln_Income     =         6.7
    
    69._at       : L.ln_Income     =         6.8
    
    70._at       : L.ln_Income     =         6.9
    
    71._at       : L.ln_Income     =           7
    
    72._at       : L.ln_Income     =         7.1
    
    73._at       : L.ln_Income     =         7.2
    
    74._at       : L.ln_Income     =         7.3
    
    75._at       : L.ln_Income     =         7.4
    
    76._at       : L.ln_Income     =         7.5
    
    77._at       : L.ln_Income     =         7.6
    
    78._at       : L.ln_Income     =         7.7
    
    79._at       : L.ln_Income     =         7.8
    
    80._at       : L.ln_Income     =         7.9
    
    81._at       : L.ln_Income     =           8
    
    82._at       : L.ln_Income     =         8.1
    
    83._at       : L.ln_Income     =         8.2
    
    84._at       : L.ln_Income     =         8.3
    
    85._at       : L.ln_Income     =         8.4
    
    86._at       : L.ln_Income     =         8.5
    
    87._at       : L.ln_Income     =         8.6
    
    88._at       : L.ln_Income     =         8.7
    
    89._at       : L.ln_Income     =         8.8
    
    90._at       : L.ln_Income     =         8.9
    
    91._at       : L.ln_Income     =           9
    
    92._at       : L.ln_Income     =         9.1
    
    93._at       : L.ln_Income     =         9.2
    
    94._at       : L.ln_Income     =         9.3
    
    95._at       : L.ln_Income     =         9.4
    
    96._at       : L.ln_Income     =         9.5
    
    97._at       : L.ln_Income     =         9.6
    
    98._at       : L.ln_Income     =         9.7
    
    99._at       : L.ln_Income     =         9.8
    
    100._at      : L.ln_Income     =         9.9
    
    101._at      : L.ln_Income     =          10
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    L.gini_disp  |
             _at |
              1  |  -.0092847   .0008463   -10.97   0.000    -.0109434    -.007626
              2  |  -.0091853   .0008367   -10.98   0.000    -.0108253   -.0075453
              3  |  -.0090859   .0008272   -10.98   0.000    -.0107072   -.0074645
              4  |  -.0089864   .0008177   -10.99   0.000    -.0105891   -.0073837
              5  |   -.008887   .0008082   -11.00   0.000     -.010471    -.007303
              6  |  -.0087876   .0007987   -11.00   0.000     -.010353   -.0072222
              7  |  -.0086882   .0007892   -11.01   0.000    -.0102349   -.0071414
              8  |  -.0085887   .0007797   -11.02   0.000    -.0101169   -.0070606
              9  |  -.0084893   .0007702   -11.02   0.000    -.0099988   -.0069798
             10  |  -.0083899   .0007607   -11.03   0.000    -.0098807    -.006899
             11  |  -.0082905   .0007511   -11.04   0.000    -.0097627   -.0068182
             12  |   -.008191   .0007416   -11.04   0.000    -.0096447   -.0067374
             13  |  -.0080916   .0007322   -11.05   0.000    -.0095266   -.0066566
             14  |  -.0079922   .0007227   -11.06   0.000    -.0094086   -.0065758
             15  |  -.0078928   .0007132   -11.07   0.000    -.0092906    -.006495
             16  |  -.0077934   .0007037   -11.08   0.000    -.0091725   -.0064142
             17  |  -.0076939   .0006942   -11.08   0.000    -.0090545   -.0063333
             18  |  -.0075945   .0006847   -11.09   0.000    -.0089365   -.0062525
             19  |  -.0074951   .0006752   -11.10   0.000    -.0088185   -.0061717
             20  |  -.0073957   .0006657   -11.11   0.000    -.0087005   -.0060908
             21  |  -.0072962   .0006563   -11.12   0.000    -.0085825     -.00601
             22  |  -.0071968   .0006468   -11.13   0.000    -.0084645   -.0059291
             23  |  -.0070974   .0006373   -11.14   0.000    -.0083465   -.0058482
             24  |   -.006998   .0006279   -11.15   0.000    -.0082286   -.0057674
             25  |  -.0068985   .0006184   -11.16   0.000    -.0081106   -.0056865
             26  |  -.0067991    .000609   -11.17   0.000    -.0079927   -.0056056
             27  |  -.0066997   .0005995   -11.18   0.000    -.0078747   -.0055247
             28  |  -.0066003   .0005901   -11.19   0.000    -.0077568   -.0054438
             29  |  -.0065009   .0005806   -11.20   0.000    -.0076389   -.0053628
             30  |  -.0064014   .0005712   -11.21   0.000    -.0075209   -.0052819
             31  |   -.006302   .0005618   -11.22   0.000     -.007403    -.005201
             32  |  -.0062026   .0005523   -11.23   0.000    -.0072851     -.00512
             33  |  -.0061032   .0005429   -11.24   0.000    -.0071673   -.0050391
             34  |  -.0060037   .0005335   -11.25   0.000    -.0070494   -.0049581
             35  |  -.0059043   .0005241   -11.27   0.000    -.0069315   -.0048771
             36  |  -.0058049   .0005147   -11.28   0.000    -.0068137   -.0047961
             37  |  -.0057055   .0005053   -11.29   0.000    -.0066959   -.0047151
             38  |   -.005606   .0004959   -11.30   0.000    -.0065781    -.004634
             39  |  -.0055066   .0004866   -11.32   0.000    -.0064603    -.004553
             40  |  -.0054072   .0004772   -11.33   0.000    -.0063425   -.0044719
             41  |  -.0053078   .0004678   -11.35   0.000    -.0062247   -.0043908
             42  |  -.0052084   .0004585   -11.36   0.000     -.006107   -.0043097
             43  |  -.0051089   .0004492   -11.37   0.000    -.0059893   -.0042286
             44  |  -.0050095   .0004398   -11.39   0.000    -.0058716   -.0041474
             45  |  -.0049101   .0004305   -11.40   0.000    -.0057539   -.0040663
             46  |  -.0048107   .0004212   -11.42   0.000    -.0056363   -.0039851
             47  |  -.0047112   .0004119   -11.44   0.000    -.0055186   -.0039038
             48  |  -.0046118   .0004027   -11.45   0.000     -.005401   -.0038226
             49  |  -.0045124   .0003934   -11.47   0.000    -.0052835   -.0037413
             50  |   -.004413   .0003842   -11.49   0.000    -.0051659     -.00366
             51  |  -.0043135    .000375   -11.50   0.000    -.0050485   -.0035786
             52  |  -.0042141   .0003658   -11.52   0.000     -.004931   -.0034972
             53  |  -.0041147   .0003566   -11.54   0.000    -.0048136   -.0034158
             54  |  -.0040153   .0003474   -11.56   0.000    -.0046962   -.0033343
             55  |  -.0039158   .0003383   -11.58   0.000    -.0045789   -.0032528
             56  |  -.0038164   .0003292   -11.59   0.000    -.0044616   -.0031712
             57  |   -.003717   .0003201   -11.61   0.000    -.0043444   -.0030896
             58  |  -.0036176   .0003111   -11.63   0.000    -.0042272   -.0030079
             59  |  -.0035182    .000302   -11.65   0.000    -.0041101   -.0029262
             60  |  -.0034187   .0002931   -11.67   0.000    -.0039931   -.0028443
             61  |  -.0033193   .0002841   -11.68   0.000    -.0038762   -.0027624
             62  |  -.0032199   .0002752   -11.70   0.000    -.0037593   -.0026804
             63  |  -.0031205   .0002664   -11.71   0.000    -.0036426   -.0025983
             64  |   -.003021   .0002576   -11.73   0.000    -.0035259   -.0025161
             65  |  -.0029216   .0002489   -11.74   0.000    -.0034094   -.0024338
             66  |  -.0028222   .0002402   -11.75   0.000     -.003293   -.0023514
             67  |  -.0027228   .0002316   -11.76   0.000    -.0031767   -.0022688
             68  |  -.0026233   .0002231   -11.76   0.000    -.0030606    -.002186
             69  |  -.0025239   .0002147   -11.76   0.000    -.0029447   -.0021031
             70  |  -.0024245   .0002064   -11.75   0.000     -.002829     -.00202
             71  |  -.0023251   .0001982   -11.73   0.000    -.0027135   -.0019366
             72  |  -.0022257   .0001901   -11.71   0.000    -.0025983    -.001853
             73  |  -.0021262   .0001822   -11.67   0.000    -.0024834   -.0017691
             74  |  -.0020268   .0001745   -11.62   0.000    -.0023687   -.0016849
             75  |  -.0019274   .0001669   -11.55   0.000    -.0022545   -.0016003
             76  |   -.001828   .0001596   -11.46   0.000    -.0021407   -.0015152
             77  |  -.0017285   .0001525   -11.34   0.000    -.0020274   -.0014297
             78  |  -.0016291   .0001457   -11.18   0.000    -.0019146   -.0013436
             79  |  -.0015297   .0001392   -10.99   0.000    -.0018025   -.0012568
             80  |  -.0014303   .0001331   -10.74   0.000    -.0016912   -.0011693
             81  |  -.0013308   .0001275   -10.44   0.000    -.0015807    -.001081
             82  |  -.0012314   .0001223   -10.07   0.000    -.0014711   -.0009917
             83  |   -.001132   .0001177    -9.62   0.000    -.0013627   -.0009013
             84  |  -.0010326   .0001137    -9.08   0.000    -.0012554   -.0008097
             85  |  -.0009332   .0001104    -8.45   0.000    -.0011496   -.0007167
             86  |  -.0008337   .0001079    -7.73   0.000    -.0010452   -.0006223
             87  |  -.0007343   .0001061    -6.92   0.000    -.0009424   -.0005263
             88  |  -.0006349   .0001053    -6.03   0.000    -.0008412   -.0004286
             89  |  -.0005355   .0001053    -5.09   0.000    -.0007418   -.0003291
             90  |   -.000436   .0001061    -4.11   0.000     -.000644    -.000228
             91  |  -.0003366   .0001078    -3.12   0.002     -.000548   -.0001252
             92  |  -.0002372   .0001104    -2.15   0.032    -.0004535   -.0000209
             93  |  -.0001378   .0001137    -1.21   0.225    -.0003605     .000085
             94  |  -.0000383   .0001176    -0.33   0.744    -.0002689    .0001922
             95  |   .0000611   .0001222     0.50   0.617    -.0001785    .0003007
             96  |   .0001605   .0001274     1.26   0.208    -.0000892    .0004102
             97  |   .0002599    .000133     1.95   0.051    -8.34e-07    .0005207
             98  |   .0003593   .0001391     2.58   0.010     .0000867     .000632
             99  |   .0004588   .0001456     3.15   0.002     .0001734    .0007441
            100  |   .0005582   .0001524     3.66   0.000     .0002595    .0008569
            101  |   .0006576   .0001595     4.12   0.000     .0003451    .0009702
    ------------------------------------------------------------------------------
    
    . marginsplot
    
      Variables that uniquely identify margins: L.ln_Income
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	32.1 KB
ID:	1539074


    But, I am not sure if this is the appropriate code for the information I am trying to get. Any help understanding the appropriate code would be greatly appreciated.
Working...
X