Announcement

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

  • Margins command in DiD with interaction of factor + continuous logged variable

    I'm using a DiD model to understand how change in a particular U.S. *state-level* policy influenced my outcome of interest in the several months before a particular *federal* policy turned off, and after a particular federal policy turned off. I'm interested in understanding how change in this policy affected my outcome of interest in the pre- and post-periods in both the control group of states (where the federal policy remained on in the post-period) and the treatment group of states (where the federal policy was off in the post-period). The state-level policy is a continuous variable; and because it's right-skewed it's logged.

    I'm using the margins command to try to get at these questions. But I'm unsure how best to represent my continuous logged state-level policy in the command. I've come up with an approach where I enter different values of the logged variable, but I'm having trouble interpreting what moving from one value of the logged variable to another actually means. Any thoughts? Thanks.

    Code:
    logit reemp3 i.postperiod##i.cutoff3##c.l_denials2019 b3.age_group b1.race_wbho b4.edu4 i.woman##i.marstdum1##i.ownkidd_18 b1.ind_nilf b1.uh_occmaj_b2 sampjl b1.durg ur_sa ur2_sa ur3_sa iur iur2 iur3 initrate initrate2 initrate3 empgrowth emp2 emp3 l_incrate_jhu stringd if sampall==1 & age>=18 & age<65 [pw=wtfinl], vce(cluster statefip) or 
    margins i.cutoff3, at(l_denials2019=(-1(.5)1.5)) dydx(postperiod) pwcompare(cimargins effects)

  • #2
    Well, you do not say if you used log base 10 or natural logarithms. If it was log base 10, as you move from l_denials2019 = -1 through .5 to 1.5, this is the same as moving from denials = 0.1 through 3.162 to 31.62. If it was natural logarithms, the corresponding values of denials are 0.37, 1.6, and 4.5 (using 2 significant figures in each case).

    That's probably not particularly helpful. You would probably prefer to have outputs that correspond to denials values like 1, 10, 100, and 1000 or something like that. (I don't now what the scale of denials is, although since you say it's right skewed I presume it covers several orders of magnitude.) If you used base 10 logarithms, the corresponding values of l_denials2019 you would use in the -at()- option of -margins- would be 0, 1, 2, and 3. If you used natural logarithms, 0, 2.3, 4.6, and 6.9 would be close approximations. Anyway, pick what you think are some interesting values of denials itself, and then use their logarithms in the -at()- option. Picking round number values of the logged variable itself usually leads to strange values of the unlogged variable.

    Comment


    • #3
      I see. I use the natural logarithm of denials (and of another measure I'm interested in). I guess I wasn't *super* off track then, which is good to know. Thank you so much Clyde.

      Another quick, related question. If I'm simply comparing the change in my outcome of interest associated with a change in the state denial rate in the (1) pre-period and (2) the post-period (this isn't a DiD, but similar), what do I put after the margins command. For a DiD, I would put the dummy indicating whether a state was a treatment or control state, but I'm not distinguishing states this way in this particular model.

      Code:
      logit reemp3 c.l_denials2019##i.prepostperiod_c b3.age_group b1.race_wbho b4.edu4 i.woman##i.marstdum1##i.ownkidd_18 b1.ind_nilf b1.uh_occmaj_b2 sampjl b1.durg ur_sa ur2_sa ur3_sa iur iur2 iur3 initrate initrate2 initrate3 empgrowth emp2 emp3 incrate_jhu stringd if cutoff3==0 & sampall==1 & age>=18 & age<65 [pw=wtfinl], vce(cluster statefip) or
      margins [?], at(l_denials2019=(-2.3025,-1.6094)) dydx(prepostperiod_c) pwcompare(cimargins effects)
      margins [?], at(l_denials2019=(-1.6094,-1.2040)) dydx(prepostperiod_c) pwcompare(cimargins effects)
      margins [?], at(l_denials2019=(-1.2040,-0.9163)) dydx(prepostperiod_c) pwcompare(cimargins effects)
      margins [?], at(l_denials2019=(-0.9163,-0.5108)) dydx(prepostperiod_c) pwcompare(cimargins effects)
      margins [?], at(l_denials2019=(-0.5108,-0.2231)) dydx(prepostperiod_c) pwcompare(cimargins effects)

      Comment


      • #4
        I'm not sure I understand what you want to do here.

        If what you want is, at each pair of values of l_denials2019, a comparison of the marginal effect of prepostperiod_c on reemp3, you don't need anything at all in the places where you have put [?].

        Comment


        • #5
          Yes, that's right. Okay, good to know! :/

          Thanks so much.

          Comment


          • #6
            Okay now I'm just confusing myself. So, to clarify, my aim is to know the (1) change in reemployment in my pre-period (before federal policies turned off) associated with an incremental change in my state-level policy of interest; and (2) the change in reemployment in my post-period (after federal policies turned off) associated with an incremental change in my state-level policy of interest. Then I'd like to compare the change in reemployment in those two periods. My state-level policy of interest is continuous, and reflects conditions from 2019/pre-pandemic. Is the following code producing results consistent with these aims (state-level policy==REPLACE202001)? I'm not sure it is. I interpret the first line of the table after the regression results pasted below as follows: At a 2019 replacement rate of 0.3, the probability of reemployment declines by 12.4 percentage points in the post-period (POSTPERIOD_C==1) relative to the pre-period (POSTPERIOD_C==0). At a 2019 replacement rate of 0.4, the probability of reemployment declines by 9.3 percentage points in the post-period relative to the pre-period. The change in the probability of reemployment pre- to post- associated with an increase in REPLACE202001 from 0.3 to 0.4 is an increase of ~3.0 percentage points. Is this correct? I'm not sure that's exactly what I'm looking for...

            Code:
             // Continuous states
            . logit reemp3 c.replace202001##i.postperiod_c b3.age_group b1.race_wbho b4.edu4 i.woman##i.marstdum1##i.ownkidd_18 b1.ind_nilf b1.uh_occmaj_b2
            >  sampjl b1.durg ur_sa ur2_sa ur3_sa iur iur2 iur3 initrate initrate2 initrate3 empgrowth emp2 emp3 incrate_jhu stringd if cutoff3==0 & sampal
            > l==1 & age>=18 & age<65 [pw=wtfinl], vce(cluster statefip) or
            
            note: 11.uh_occmaj_b2 omitted because of collinearity.
            Iteration 0:   log pseudolikelihood =  -10976554  
            Iteration 1:   log pseudolikelihood =  -10254963  
            Iteration 2:   log pseudolikelihood =  -10220872  
            Iteration 3:   log pseudolikelihood =  -10220748  
            Iteration 4:   log pseudolikelihood =  -10220748  
            
            Logistic regression                                     Number of obs =  5,276
                                                                    Wald chi2(24) =      .
                                                                    Prob > chi2   =      .
            Log pseudolikelihood = -10220748                        Pseudo R2     = 0.0689
            
                                                                                (Std. err. adjusted for 25 clusters in statefip)
            --------------------------------------------------------------------------------------------------------------------
                                                               |               Robust
                                                        reemp3 | Odds ratio   std. err.      z    P>|z|     [95% conf. interval]
            ---------------------------------------------------+----------------------------------------------------------------
                                                 replace202001 |   .3908696   .0804423    -4.56   0.000      .261127    .5850757
                                                1.postperiod_c |   .2590456   .1018864    -3.43   0.001     .1198357    .5599716
                                                               |
                                  postperiod_c#c.replace202001 |
                                                            1  |   6.977865    4.40814     3.08   0.002     2.022979    24.06876
                                                               |
                                                     age_group |
                                                        18-24  |   .9596728   .1249544    -0.32   0.752     .7435194    1.238666
                                                        25-34  |   .9455646   .0784207    -0.67   0.500     .8037048    1.112464
                                                        45-54  |   1.028395   .1166215     0.25   0.805     .8234413    1.284362
                                                        55-64  |   .6779604   .0676142    -3.90   0.000     .5575868    .8243207
                                                               |
                                                     race_wbho |
                                                   2 black nh  |   .5652924   .0622067    -5.18   0.000     .4556213     .701362
                                            3 hispanic/latino  |   1.043402   .0764586     0.58   0.562     .9038103    1.204554
                                                     other nh  |   .7714579   .0640221    -3.13   0.002     .6556504    .9077205
                                                               |
                                                          edu4 |
                                               1 Less than HS  |   .9829508   .2898804    -0.06   0.954      .551449    1.752097
                                                  2 HS or GED  |   1.098649   .1426843     0.72   0.469     .8517481     1.41712
                               3 Some college or Associate's'  |   .9390172   .1255594    -0.47   0.638     .7225307    1.220368
                                                               |
                                                       1.woman |   1.177169   .1238468     1.55   0.121     .9578248    1.446743
                                                   1.marstdum1 |   1.340889   .1672577     2.35   0.019     1.050067    1.712256
                                                               |
                                               woman#marstdum1 |
                                                          1 1  |   .6232107   .1266548    -2.33   0.020      .418452    .9281628
                                                               |
                                                    ownkidd_18 |
                                  1: Own children, <18, in HH  |   1.099696   .2887049     0.36   0.717     .6573628    1.839669
                                                               |
                                              woman#ownkidd_18 |
                                1#1: Own children, <18, in HH  |   .5830044   .1969427    -1.60   0.110     .3006979    1.130351
                                                               |
                                          marstdum1#ownkidd_18 |
                                1#1: Own children, <18, in HH  |   .9187734   .2807725    -0.28   0.782     .5047607    1.672366
                                                               |
                                    woman#marstdum1#ownkidd_18 |
                              1#1#1: Own children, <18, in HH  |   1.614831   .9043988     0.86   0.392     .5387722    4.840042
                                                               |
                                                      ind_nilf |
                                                            2  |   1.008935   .7943828     0.01   0.991     .2156113    4.721227
                                                            3  |   .8218412   .6241468    -0.26   0.796     .1854998    3.641098
                                                            4  |   .7362544   .5675038    -0.40   0.691     .1625261    3.335284
                                                            5  |   .8072551   .6671324    -0.26   0.796     .1597939    4.078134
                                                            6  |   1.075963    .767282     0.10   0.918      .265947    4.353107
                                                            7  |   .8152595   .6483169    -0.26   0.797     .1715524    3.874315
                                                            8  |   1.088907   .8210364     0.11   0.910      .248419    4.773062
                                                            9  |   .8037362   .6618876    -0.27   0.791     .1600065    4.037285
                                                           10  |   1.020706   .7793735     0.03   0.979     .2285357    4.558762
                                                           11  |   .8773667    .709198    -0.16   0.871     .1799423    4.277885
                                                           12  |   1.211449   .9883693     0.24   0.814     .2448195    5.994653
                                                           13  |   .8441731   .6686322    -0.21   0.831     .1787444    3.986856
                                                           14  |   .6144167   .3983108    -0.75   0.452      .172445    2.189149
                                                               |
                                                  uh_occmaj_b2 |
                         professional and related occupations  |   1.139689   .1703431     0.87   0.382     .8502801    1.527604
                                          service occupations  |   .9715815   .1640082    -0.17   0.864     .6978978    1.352592
                                sales and related occupations  |   .9068438   .1863739    -0.48   0.634     .6061696    1.356659
                office and administrative support occupations  |   .8583506   .1022682    -1.28   0.200      .679592    1.084129
                   farming, fishing, and forestry occupations  |   .3849714   .1922923    -1.91   0.056      .144629    1.024712
                      construction and extraction occupations  |   1.233582   .2563784     1.01   0.312     .8208437    1.853853
            installation, maintenance, and repair occupations  |    1.19539   .2477398     0.86   0.389     .7963452    1.794393
                                       production occupations  |   1.115154   .1909655     0.64   0.524     .7972055     1.55991
               transportation and material moving occupations  |   1.039428   .1308537     0.31   0.759     .8121503    1.330308
                                                 armed forces  |          1  (omitted)
                                                               |
                                                        sampjl |   1.098445   .1063484     0.97   0.332     .9085891    1.327973
                                                               |
                                                          durg |
                                                    5-8 weeks  |   .6573227   .0680278    -4.05   0.000     .5366435      .80514
                                                   9-12 weeks  |   .5052701   .0795993    -4.33   0.000     .3710452    .6880506
                                                  13-16 weeks  |   .4627328   .0687943    -5.18   0.000     .3457661    .6192673
                                                  17-20 weeks  |   .3586904   .0965617    -3.81   0.000      .211627    .6079509
                                                  21-26 weeks  |    .523649   .0813003    -4.17   0.000     .3862647    .7098973
                                                  27-32 weeks  |   .4029359   .0867702    -4.22   0.000     .2642007    .6145228
                                                  33-38 weeks  |   .4209364   .0692267    -5.26   0.000     .3049501    .5810375
                                                  39-44 weeks  |   .5008512    .117318    -2.95   0.003     .3164649     .792669
                                                  45-50 weeks  |    .218392    .044037    -7.55   0.000     .1470953    .3242461
                                                  51-52 weeks  |   .4446362   .0684153    -5.27   0.000     .3288759    .6011427
                                                    >52 weeks  |   .1828104   .0276731   -11.23   0.000     .1358781    .2459532
                                                               |
                                                         ur_sa |   649363.7   5.89e+07     0.15   0.883     3.97e-72    1.06e+83
                                                        ur2_sa |   1.73e+30   2.94e+33     0.04   0.967            0           .
                                                        ur3_sa |          0          0    -0.32   0.747            0           .
                                                           iur |   6.74e-09   2.78e-07    -0.46   0.648     5.28e-44    8.59e+26
                                                          iur2 |   2.3e+117   3.2e+120     0.20   0.845            0           .
                                                          iur3 |          .          .     0.07   0.943            0           .
                                                      initrate |   1.19e+90   1.60e+92     1.54   0.124     2.72e-25    5.2e+204
                                                     initrate2 |          0          0    -1.04   0.298            0           .
                                                     initrate3 |          .          .     0.78   0.435            0           .
                                                     empgrowth |   .9561642   .2370568    -0.18   0.857     .5881641    1.554413
                                                          emp2 |   .8436962   .3180918    -0.45   0.652     .4029625    1.766475
                                                          emp3 |   1.078436   .1734575     0.47   0.639     .7868386    1.478098
                                                   incrate_jhu |   1.000033    .000031     1.07   0.285     .9999723    1.000094
                                                       stringd |   .9988963   .0025561    -0.43   0.666     .9938989    1.003919
                                                         _cons |   .7845825   1.270862    -0.15   0.881     .0327995    18.76766
            --------------------------------------------------------------------------------------------------------------------
            Note: _cons estimates baseline odds.
            
            . margins, at(replace202001=(.3(.1).8)) dydx(postperiod_c) pwcompare(cimargins effects)
            
            Pairwise comparisons of average marginal effects
            
            Model VCE: Robust                                        Number of obs = 5,276
            
            Expression: Pr(reemp3), predict()
            dy/dx wrt:  1.postperiod_c
            1._at: replace202001 = .3
            2._at: replace202001 = .4
            3._at: replace202001 = .5
            4._at: replace202001 = .6
            5._at: replace202001 = .7
            6._at: replace202001 = .8
            
            -----------------------------------------------------------------
                            |            Delta-method         Unadjusted
                            |     Margin   std. err.     [95% conf. interval]
            ----------------+------------------------------------------------
            0.postperiod_c  |  (base outcome)
            ----------------+------------------------------------------------
            1.postperiod_c  |
                        _at |
                         1  |  -.1240453   .0305468      -.183916   -.0641746
                         2  |  -.0928975    .023879     -.1396994   -.0460955
                         3  |  -.0615738     .01779     -.0964416    -.026706
                         4  |   -.030101   .0146433     -.0588013   -.0014007
                         5  |   .0014934   .0176973     -.0331926    .0361794
                         6  |   .0331809   .0258306     -.0174462     .083808
            -----------------------------------------------------------------
            Note: dy/dx for factor levels is the discrete change from the
                  base level.
            
            ---------------------------------------------------------------------------------
                            |   Contrast Delta-method    Unadjusted           Unadjusted
                            |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
            ----------------+----------------------------------------------------------------
            0.postperiod_c  |  (base outcome)
            ----------------+----------------------------------------------------------------
            1.postperiod_c  |
                        _at |
                    2 vs 1  |   .0311479   .0078581     3.96   0.000     .0157463    .0465494
                    3 vs 1  |   .0624716   .0164862     3.79   0.000     .0301591     .094784
                    4 vs 1  |   .0939443   .0259316     3.62   0.000     .0431193    .1447693
                    5 vs 1  |   .1255388    .036223     3.47   0.001      .054543    .1965346
                    6 vs 1  |   .1572263   .0473687     3.32   0.001     .0643853    .2500672
                    3 vs 2  |   .0313237   .0086441     3.62   0.000     .0143816    .0482658
                    4 vs 2  |   .0627965   .0181179     3.47   0.001      .027286    .0983069
                    5 vs 2  |   .0943909   .0284472     3.32   0.001     .0386355    .1501463
                    6 vs 2  |   .1260784   .0396373     3.18   0.001     .0483908     .203766
                    4 vs 3  |   .0314728   .0094866     3.32   0.001     .0128794    .0500662
                    5 vs 3  |   .0630672   .0198385     3.18   0.001     .0241845    .1019499
                    6 vs 3  |   .0947547   .0310584     3.05   0.002     .0338813    .1556281
                    5 vs 4  |   .0315944   .0103619     3.05   0.002     .0112854    .0519034
                    6 vs 4  |   .0632819   .0215996     2.93   0.003     .0209475    .1056163
                    6 vs 5  |   .0316875   .0112455     2.82   0.005     .0096468    .0537282
            ---------------------------------------------------------------------------------
            Note: dy/dx for factor levels is the discrete change from the base level.

            Last edited by Claire McKenna; 05 Dec 2022, 15:49. Reason: Changed "percent" to "percentage points" in two places

            Comment


            • #7
              I interpret the first line of the table after the regression results pasted below as follows: At a 2019 replacement rate of 0.3, the probability of reemployment declines by 12.4 percentage points in the post-period (POSTPERIOD_C==1) relative to the pre-period (POSTPERIOD_C==0). At a 2019 replacement rate of 0.4, the probability of reemployment declines by 9.3 percentage points in the post-period relative to the pre-period. The change in the probability of reemployment pre- to post- associated with an increase in REPLACE202001 from 0.3 to 0.4 is an increase of ~3.0 percentage points. Is this correct?
              Yes, precisely so. Well, to 1 decimal place! :-)

              I'm not sure that's exactly what I'm looking for...
              Sometimes the hardest part is coming up with an exactly correct statement of what you need to calculate. If you can do that in plain English, and it isn't synonymous with what you've done, then I can probably help you find the Stata command that will get it for you, or, as here, confirm when you've figured that out for yourself. But it seems to me you have a lot of moving parts here, and I can't determine which relationships among them are of interest to you, nor, as this is not my content area, which ones even make sense to think about.

              Comment


              • #8
                Thank you. My interpretation of the output isn't the same as what I'm aiming for, as far as I understand. Am I wrong? My aim is to know the (1) change in my outcome (probability of reemployment, REEMP3) in the pre-period (before federal policies turned off--POSTPERIOD_C==0) associated with an incremental change in my state-level policy of interest (so, REPLACE202001 increasing from 0.3 to 0.4); and (2) the change in reemployment in my post-period (after federal policies turned off) associated with an incremental change in my state-level policy of interest (so, REPLACE202001 increasing from 0.3 to 0.4). Then I'd like to compare the change in reemployment from across those two periods. Does that make sense? I want to know how the change in the state-level policy affected my outcome, when federal policies on and when federal policies off, in order to know if the federal policies provided some sort of protective effect against pre-pandemic state policy strictness. I hope that makes sense.

                Comment


                • #9
                  OK. Then that would be
                  Code:
                  margins postperiod, dydx(REPLACE202001) at(REPLACE202001 = (....) ) // FILL IN THE .... WITH APPROPRIATE LIST OF VALUES
                  to get the marginal effect of REPLACE202001 in each period at the specified values of REPLACE202001. Then, to compare the foreign vs domestic
                  Code:
                  margins r.postperiod, dydx(REPLACE202001) at(REPLACE202001 = (....) )
                  The r. operator tells Stata to do comparisons between consecutive levels of the variable.

                  Comment


                  • #10
                    Clyde, you're a lifesaver. It does seem to take a few minutes to run. I just want to confirm I have the code right for the different variations of policy variable I'm working with (one regular; two logged). Am I missing anything from the following?

                    For logged (for change at one level):
                    Code:
                    margins prepostperiod_m, dydx(l_denials2019) at(l_denials2019=(-2.3025,-1.6094))
                    margins r.prepostperiod_m, dydx(l_denials2019) at(l_denials2019=(-2.3025,-1.6094))
                    For non-logged:
                    Code:
                    margins prepostperiod_m, dydx(replace202001) at(replace202001=(.3(.1).8))
                    margins r.prepostperiod_m, dydx(replace202001) at(replace202001=(.3(.1).8))
                    And after a DiD is like so?
                    Code:
                    logit reemp3 i.postperiod##i.cutoff3##c.l_denials2019 b3.age_group b1.race_wbho b4.edu4 i.woman##i.marstdum1##i.ownkidd_18 b1.ind_nilf b1.uh_occmaj_b2 sampjl b1.durg ur_sa ur2_sa ur3_sa iur iur2 iur3 initrate initrate2 initrate3 empgrowth emp2 emp3 l_incrate_jhu stringd if sampall==1 & age>=18 & age<65 [pw=wtfinl], vce(cluster statefip) or 
                    
                    margins i.postperiod#i.cutoff3, dydx(l_denials2019) at(l_denials2019=(-2.3025,-1.6094)) 
                    margins r.postperiod#i.cutoff3, dydx(l_denials2019) at(l_denials2019=(-2.3025,-1.6094))




                    Last edited by Claire McKenna; 05 Dec 2022, 20:03.

                    Comment


                    • #11
                      That all looks right to me.

                      Comment


                      • #12
                        Clyde Schechter, a quick follow up question to this work: to what base am I applying the percentage-point changes produced by the margins command -- is it the constant in the full model? But I have that coming out as an odds ratio...

                        Comment


                        • #13
                          The constant in the logistic regression output, although it is called an "odds ratio" is actually an odds. And, in any case, the results of -margins- are never "applied to" anything in the regression output. The -margins- output stands on its own for interpretation. For example, looking at the output shown in #6, reproduced here:
                          Code:
                          Expression: Pr(reemp3), predict()
                          dy/dx wrt:  1.postperiod_c
                          1._at: replace202001 = .3
                          2._at: replace202001 = .4
                          3._at: replace202001 = .5
                          4._at: replace202001 = .6
                          5._at: replace202001 = .7
                          6._at: replace202001 = .8
                          
                          -----------------------------------------------------------------
                                          |            Delta-method         Unadjusted
                                          |     Margin   std. err.     [95% conf. interval]
                          ----------------+------------------------------------------------
                          0.postperiod_c  |  (base outcome)
                          ----------------+------------------------------------------------
                          1.postperiod_c  |
                                      _at |
                                       1  |  -.1240453   .0305468      -.183916   -.0641746
                                       2  |  -.0928975    .023879     -.1396994   -.0460955
                                       3  |  -.0615738     .01779     -.0964416    -.026706
                                       4  |   -.030101   .0146433     -.0588013   -.0014007
                                       5  |   .0014934   .0176973     -.0331926    .0361794
                                       6  |   .0331809   .0258306     -.0174462     .083808
                          -----------------------------------------------------------------
                          Note: dy/dx for factor levels is the discrete change from the
                                base level.
                          
                          ---------------------------------------------------------------------------------
                                          |   Contrast Delta-method    Unadjusted           Unadjusted
                                          |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
                          ----------------+----------------------------------------------------------------
                          0.postperiod_c  |  (base outcome)
                          ----------------+----------------------------------------------------------------
                          1.postperiod_c  |
                                      _at |
                                  2 vs 1  |   .0311479   .0078581     3.96   0.000     .0157463    .0465494
                                  3 vs 1  |   .0624716   .0164862     3.79   0.000     .0301591     .094784
                                  4 vs 1  |   .0939443   .0259316     3.62   0.000     .0431193    .1447693
                                  5 vs 1  |   .1255388    .036223     3.47   0.001      .054543    .1965346
                                  6 vs 1  |   .1572263   .0473687     3.32   0.001     .0643853    .2500672
                                  3 vs 2  |   .0313237   .0086441     3.62   0.000     .0143816    .0482658
                                  4 vs 2  |   .0627965   .0181179     3.47   0.001      .027286    .0983069
                                  5 vs 2  |   .0943909   .0284472     3.32   0.001     .0386355    .1501463
                                  6 vs 2  |   .1260784   .0396373     3.18   0.001     .0483908     .203766
                                  4 vs 3  |   .0314728   .0094866     3.32   0.001     .0128794    .0500662
                                  5 vs 3  |   .0630672   .0198385     3.18   0.001     .0241845    .1019499
                                  6 vs 3  |   .0947547   .0310584     3.05   0.002     .0338813    .1556281
                                  5 vs 4  |   .0315944   .0103619     3.05   0.002     .0112854    .0519034
                                  6 vs 4  |   .0632819   .0215996     2.93   0.003     .0209475    .1056163
                                  6 vs 5  |   .0316875   .0112455     2.82   0.005     .0096468    .0537282
                          ---------------------------------------------------------------------------------
                          the first table tells us that when replace202001 = 0.3, the difference in reemp3 between the postperiod_c = 1 condition and the postperiod_c = 0 condition is -.1240453. Otherwise put, reemp3 is 12.4 %pts lower when postperiod_c = 1 than when postperiod_c = 1 under the condition that replace202001 = 0.3. This is the marginal effect of postperiod_c on reemp3 conditional on replace202001 = 0.3

                          The second table says that the difference between the marginal effect of postperiod_c conditional on replace202001 = 0.4 and the marginal effect of postperiod_c conditional on replace202001 = 0.3 is 0.0311479. In other words, the marginal effect of postperiod_c conditional on replace202001 = 0.4 is 3.1 percentage points higher than the marginal effect of postperiod_c conditional on replace202001 = 0.3.

                          None of this requires referring to the logistic regression output, and trying to do so will just lead to confusion. The metrics are different (probabilities vs odds and odds ratios), and the -margins- command provides output for all levels of categorical variables--the -margins- results are not relative to an omitted base category.

                          Comment


                          • #14
                            Many thanks. But how do I know whether these effects are large (or small) in magnitude? There's the unadjusted mean of reemp3 that I can pull from my sample descriptive statistics??? Sorry if I'm just being a little dense.

                            (also FWIW I'm now convinced that the original structure of code is more meaningful for me (versus what's discussed in posts 8 through 10!))

                            Comment


                            • #15
                              But how do I know whether these effects are large (or small) in magnitude?
                              That's a professional judgment that you must make based on your knowledge of your study area. My area of expertise is epidemiology, so I can't really help you. At best I can give you an informed lay opinion, which might be very naive. For example, to me a 12 percentage point difference in re-employment sounds like a lot, because I am accustomed to thinking of a 12% unemployment rate as astronomical. But that's just based on a related but different metric (unemployment) and an opinion that is largely influenced by what I read in the newspapers (or, rather, on their websites). By contrast a marginal effect of 0.0014, i.e. about a tenth of a percentage point, sounds insubstantial to me.

                              But, I can't emphasize enough, my opinions shouldn't sway you very much as this is not an area where I have any expertise. These are judgment calls that need to be made by you. If you are not comfortable doing that, then I would recommend discussing them with others in your field who are perhaps more experienced.

                              Comment

                              Working...
                              X