Announcement

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

  • Pairwise Comparisons of Average Marginal Effects

    Hi, I am aiming to look at the different effect on earnings of increasing the number of dependent children by ethnicity.

    Using the following command, I have produced the attached table.

    regress lnincome i.race age age_squared i.region i.highestqualification i.fulltime_parttime i.occupation i.marital i.religion race##i.dependentchildren i.wave, cluster(pidp), if sex==1
    margins race , dydx(dependentchildren) pwcompare.

    I wanted to check with the following interpretation of the results:

    So, in the following table. I have used a categorical variable of dependent children and have only shown results for ‘1.dependent children’ which shows the effect of increasing the number of dependent children from 0 to 1 (as 0 dependent children is the base group here).

    When attempting to interpret the highlighted co-efficients.For example -0.034, does this mean that the effect of increasing the number of dependent children from 0 to 1 on earnings for the Indian group leads to a 3.4% decrease in earnings relative to the impact on the British group of increasing the number of dependent children from 0 to 1.

    And for -0.149, the effect of increasing the number of dependent children from 0 to 1 on earnings for the Pakistani group leads to a 14.9% decrease in earnings relative to the impact on the British group of increasing the number of dependent children from 0 to 1.


    *Race is split into 5 categories: British, Indian, Pakistani, Bangladeshi and Other


    Thanks
    Attached Files

  • #2
    Attached file shows:

    Pairwise comparisons of average marginal effects
    Model VCE : Robust
    Expression : Linear prediction, predict()
    dy/dx w.r.t. : 1.dependentchildren 2.dependentchildren 3.dependentchildren 4.dependentchildren 5.dependentchildren 6.dependentchildren 7.dependentchildren 8.dependentchildren 12.dependentchildren

    Contrast Delta-method Unadjusted
    dy/dx Std.Err. [95%Conf. Interval]
    0.dependentchildren (base outcome)
    1.dependentchildren
    race
    Indian vs british -0.034 0.038 -0.108 0.040
    pakistani vs british -0.149 0.062 -0.270 -0.027
    bangladeshi vs british -0.099 0.077 -0.250 0.053
    any other vs british -0.073 0.038 -0.147 0.001
    pakistani vs indian -0.114 0.071 -0.254 0.025
    bangladeshi vs indian -0.064 0.085 -0.230 0.102
    any other vs indian -0.039 0.051 -0.139 0.062
    bangladeshi vs pakistani 0.050 0.098 -0.142 0.242
    any other vs pakistani 0.076 0.071 -0.063 0.215
    any other vs bangladeshi 0.025 0.085 -0.141 0.192

    Comment


    • #3
      Dataex:

      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input long pidp byte(sex religion) int age byte race float income byte(region marital dependentchildren highestqualification fulltime_parttime occupation) float(wave lnincome age_squared)
        280165 2 3 31  1 1191.9862  7 1 1 13 1 1 2  7.083376  961
        280165 2 3 34  1 2324.1667  7 1 1 13 1 1 5  7.751117 1156
        280165 2 3 36  1    2289.7  7 1 1 13 1 1 7  7.736176 1296
        333205 2 3 24  1 1604.1666  4 1 0 96 1 1 6   7.38036  576
        333205 2 3 25  1 1525.8334  4 1 0  2 1 2 7  7.330296  625
        387605 2 3 27  1  866.6667 10 1 0 96 1 3 7  6.764655  729
        599765 2 3 26  1 1769.3368  4 1 0  2 1 1 5   7.47836  676
       1731965 1 3 22  1 1958.3334 10 1 0 96 1 3 5  7.579849  484
       2067205 1 3 26  1  222.0574 10 1 0  2 2 3 7  5.402936  676
       2297045 1 3 17  1       175  6 1 0  8 2 3 6  5.164786  289
       2670365 2 3 16  1       230 10 1 0 13 2 3 2  5.438079  256
       2670365 2 3 17  1  346.6667 10 1 0 13 2 3 3  5.848364  289
       2817245 1 3 50  1 1581.6666 10 1 0 96 1 3 4  7.366234 2500
       2853965 2 2 30  1      1683  7 1 0  2 1 1 4  7.428333  900
       2853965 2 3 31  1      1800  7 1 0  2 1 1 5  7.495542  961
       2853965 2 3 32  1      2140  7 1 0  2 1 1 6  7.668561 1024
       2853965 2 3 33  1      2110  7 1 0  2 1 1 7  7.654443 1089
       3915445 2 3 19  1       948 10 1 0  8 2 3 2  6.854354  361
       3915445 2 3 20  1       240 10 1 0  2 2 3 3  5.480639  400
       3915445 2 3 21  1      1300 10 1 0  2 1 1 4   7.17012  441
       4091565 1 3 34  1      1800 10 1 0  1 1 1 4  7.495542 1156
       4091565 1 3 35  1      1790 10 1 0  1 1 1 5  7.489971 1225
       4091565 1 3 37  1      1920 10 1 0  1 1 1 7  7.560081 1369
       4192205 2 3 28  1 1416.8334  1 1 0 96 1 1 4   7.25618  784
       4562125 1 3 25  1 1350.4166  1 1 0  1 1 1 2  7.208169  625
       4849085 1 3 29  1 1756.8334 10 1 0  2 1 1 4  7.471268  841
       4849085 1 3 30  1      1675 10 1 0  2 1 1 5  7.423568  900
       4849085 1 3 32  1 2395.6667 10 1 0  2 1 1 7  7.781417 1024
       4853165 1 3 45  1      1600 10 1 0 14 1 3 7  7.377759 2025
      68002045 2 3 67  1 1666.2766  7 1 0 96 2 2 2  7.418347 4489
      68002045 2 3 68  1 1262.3427  7 1 0 96 2 2 3  7.140725 4624
      68006135 2 3 19  1      1100  1 1 0  2 1 3 3  7.003066  361
      68006135 2 3 21  1  977.7525  1 1 0  2 1 3 4  6.885257  441
      68006135 2 3 21  1  823.0209  1 1 0  2 1 3 5  6.712982  441
      68006139 2 3 17  1       195  1 1 0 13 2 2 4     5.273  289
      68007487 2 3 59  1       475  1 2 0  2 2 2 3  6.163315 3481
      68007487 2 3 60  1  666.6168  1 2 0  2 2 2 4  6.502215 3600
      68009527 1 3 35  1      1929  1 1 0 96 1 2 5  7.564757 1225
      68009527 1 3 37  1 1908.3333  1 1 0 96 1 2 6  7.553986 1369
      68009527 1 3 38  1      1850  1 1 0 96 1 2 7  7.522941 1444
      68010887 2 3 45  1      1700  1 1 0  2 1 1 1  7.438384 2025
      68010887 2 3 46  1      1800  1 1 0  2 1 1 2  7.495542 2116
      68010887 2 3 47  1      1800  1 1 0  2 1 1 3  7.495542 2209
      68010887 2 3 48  1       300  1 1 0  2 1 2 4  5.703783 2304
      68010887 2 3 50  1  901.8333  1 1 0  2 1 3 6   6.80443 2500
      68010887 2 3 51  1      1780  1 1 0  2 1 3 7  7.484369 2601
      68014291 2 3 19  1       850  1 1 0 13 1 3 4  6.745236  361
      68014291 2 3 21  1       930  1 1 0 13 1 3 6  6.835185  441
      68014291 2 3 22  1      1000  1 1 0 13 1 3 7  6.907755  484
      68017687 2 3 29  1  798.1934  1 2 2 13 2 3 1  6.682351  841
      68017687 2 3 30  1 1491.5266  1 2 2 13 2 3 2  7.307556  900
      68017687 2 3 36  1    836.55  1 1 2 13 2 3 7  6.729286 1296
      68019047 1 3 26  1 1523.6666  1 2 1  2 1 1 1  7.328875  676
      68019047 1 3 28  1 1855.8334  1 2 2  2 1 1 3  7.526089  784
      68019047 1 3 30  1      2628  1 2 2  2 1 1 5  7.873979  900
      68019047 1 3 31  1      2358  1 2 2  2 1 1 6  7.765569  961
      68019051 2 2 26  1   1098.66  1 2 1  2 1 1 1  7.001847  676
      68019051 2 3 28  1   1284.75  1 2 2  2 2 1 3  7.158319  784
      68019051 2 3 30  1   1162.16  1 2 2  2 2 1 5  7.058036  900
      68019051 2 3 31  1       986  1 2 2  2 2 1 6  6.893656  961
      68021773 2 3 23 97 1137.9286  7 1 0 96 1 3 2  7.036965  529
      68021773 2 3 26 97      1400  7 1 0  1 1 1 5  7.244227  676
      68021773 2 3 27 97 1324.0624  7 1 0  1 1 1 6   7.18846  729
      68021773 2 3 28 97 1916.6666  7 1 0  1 1 1 7  7.558343  784
      68021777 2 3 19 97  620.1667  7 1 0  7 2 3 2  6.429988  361
      68021781 1 3 21 97  811.4476  7 1 0  7 2 3 7   6.69882  441
      68023131 2 3 23  1  524.3334  1 1 0 96 2 3 1  6.262128  529
      68026527 2 3 36  1  679.8933  1 1 3 96 2 3 1  6.521936 1296
      68028571 1 2 42  1      1650  1 2 4 13 1 1 1  7.408531 1764
      68028571 1 3 43  1      1620  1 2 4 13 1 1 2  7.390182 1849
      68028571 1 2 45  1      1776  1 2 2 13 1 1 4  7.482119 2025
      68028571 1 3 47  1      1755  1 2 2 13 1 1 6  7.470224 2209
      68028575 2 3 20  1  628.3334  1 1 0  7 2 3 4  6.443071  400
      68028583 1 3 16  1 559.00006  1 1 0 96 2 3 6  6.326149  256
      68029927 2 2 36  1  490.5267  1 2 2 13 2 3 1   6.19548 1296
      68029931 1 3 42  1      2100  1 2 2 13 1 3 3  7.649693 1764
      68029931 1 3 43  1 2183.3333  1 2 2 13 1 3 4  7.688608 1849
      68029931 1 3 44  1      1900  1 2 2 13 1 3 5  7.549609 1936
      68029931 1 3 45  1      1800  1 2 2 13 1 1 6  7.495542 2025
      68029931 1 3 46  1      1700  1 2 1 13 1 1 7  7.438384 2116
      68029935 2 3 17  1  86.66666  1 1 0 13 2 3 6 4.4620695  289
      68029935 2 3 18  1  83.33333  1 1 0  7 2 3 7 4.4228487  324
      68030607 2 3 19  1 1007.4933  1 1 1 96 2 3 1  6.915221  361
      68032647 1 3 25  1 1581.6666  1 1 1 13 1 3 2  7.366234  625
      68032647 1 3 27  1  2686.667  1 1 1 13 1 3 4  7.896057  729
      68032647 1 3 28  1 2383.3333  1 1 1 13 1 3 5  7.776255  784
      68032647 1 3 30  1      1950  1 1 1 13 1 3 7  7.575585  900
      68035367 1 3 30  1    2072.5  1 1 0  1 1 1 3  7.636511  900
      68035367 1 3 31  1 2219.6667  1 1 0  1 1 1 4  7.705112  961
      68035367 1 3 33  1  3931.667  1 1 0  1 1 1 6  8.276818 1089
      68035367 1 3 34  1      3955  1 2 0  1 1 1 7  8.282736 1156
      68037407 2 3 42  1  1322.733  1 1 1 96 2 3 3  7.187455 1764
      68037407 2 3 43  1 1398.7114  1 1 1 96 2 3 4  7.243307 1849
      68037407 2 3 44  1  1408.579  1 1 1 96 2 3 5  7.250337 1936
      68037407 2 3 45  1 1601.6996  1 1 1 96 2 3 6   7.37882 2025
      68037407 2 3 46  1 1582.0254  1 1 1 96 2 3 7  7.366461 2116
      68041487 2 3 39  1 1657.2783  1 2 2  2 1 1 1  7.412932 1521
      68041487 2 3 40  1      2100  1 2 2  2 1 1 2  7.649693 1600
      68041487 2 3 41  1      2100  1 2 2  2 1 1 3  7.649693 1681
      68041487 2 3 43  1      2100  1 2 2  1 1 1 5  7.649693 1849
      end
      label values sex g_sex
      label def g_sex 1 "Male", modify
      label def g_sex 2 "Female", modify
      label values religion g_oprlg1
      label def g_oprlg1 2 "Church of England/Anglican", modify
      label def g_oprlg1 3 "Roman Catholic", modify
      label values age g_age_dv
      label values race g_racel_dv
      label def g_racel_dv 1 "british/english/scottish/welsh/northern irish (white)", modify
      label def g_racel_dv 97 "any other ethnic group (other ethnic group)", modify
      label values region g_gor_dv
      label def g_gor_dv 1 "North East", modify
      label def g_gor_dv 4 "East Midlands", modify
      label def g_gor_dv 6 "East of England", modify
      label def g_gor_dv 7 "London", modify
      label def g_gor_dv 10 "Wales", modify
      label values marital g_mastat_dv
      label def g_mastat_dv 1 "Single and never married/in civil partnership", modify
      label def g_mastat_dv 2 "Married", modify
      label values dependentchildren g_ndepchl_dv
      label values highestqualification g_qfhigh_dv
      label def g_qfhigh_dv 1 "Higher degree", modify
      label def g_qfhigh_dv 2 "1st degree or equivalent", modify
      label def g_qfhigh_dv 7 "A level", modify
      label def g_qfhigh_dv 8 "Welsh baccalaureate", modify
      label def g_qfhigh_dv 13 "GCSE/O level", modify
      label def g_qfhigh_dv 14 "CSE", modify
      label def g_qfhigh_dv 96 "None of the above", modify
      label values fulltime_parttime g_jbft_dv
      label def g_jbft_dv 1 "FT employee", modify
      label def g_jbft_dv 2 "PT employee", modify
      label values occupation g_jbnssec3_dv
      label def g_jbnssec3_dv 1 "Management & professional", modify
      label def g_jbnssec3_dv 2 "Intermediate", modify
      label def g_jbnssec3_dv 3 "Routine", modify

      Comment


      • #4
        Code:
        regress lnincome i.race age age_squared i.region i.highestqualification i.fulltime_parttime i.occupation i.marital i.religion race##i.dependentchildren i.wave, cluster(pidp), if sex==1
        margins race , dydx(dependentchildren) pwcompare.

        Comment


        • #5
          I have used the bottom of page 2 of https://www.stata.com/manuals13/rmar...gins,pwcompare, to assess this, however this is slightly different as the 'margins region, pwcompare' is used, whereas I am using 'margins race , dydx(dependentchildren) pwcompare'. Also, my variable of dependent children is categorical as opposed to BMI in the stata example which is continous.

          Comment

          Working...
          X