Announcement

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

  • Interpreting the controls coefficients of didregress output

    Hello all, please I am a bit confused about how best to interpret this difference-indifference result generated using didregress. The coefficient of the controls is what is proving most difficult for me. I will appreciate your kind gestures. thanks.

    Code:
    Number of groups and treatment time
    
    Time variable: period
    Control:       kd_did = 0
    Treatment:     kd_did = 1
    -----------------------------------
                 |   Control  Treatment
    -------------+---------------------
    Group        |
         facname |         3          4
    -------------+---------------------
    Time         |
         Minimum |         0          1
         Maximum |         0          1
    -----------------------------------
    
    Difference-in-differences regression                       Number of obs = 321
    Data type: Repeated cross-sectional
    
                                                (Std. err. adjusted for 7 clusters in facname)
    ------------------------------------------------------------------------------------------
                             |               Robust
                selfefficacy | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    -------------------------+----------------------------------------------------------------
    ATET                     |
                      kd_did |
                   (1 vs 0)  |  -.2716428   .1455646    -1.87   0.111    -.6278265    .0845409
    -------------------------+----------------------------------------------------------------
    Controls                 |
                         age |
                         16  |   -.010984   .0736177    -0.15   0.886      -.19112    .1691521
                         17  |   .1059812   .0621366     1.71   0.139    -.0460616    .2580241
                         18  |   .0233642   .0601636     0.39   0.711    -.1238507    .1705792
                         19  |   .0088221   .0385312     0.23   0.827    -.0854604    .1031046
                             |
                highedulevel |
                 Islamiyyah  |  -.1084261   .1579267    -0.69   0.518    -.4948588    .2780065
                    Primary  |  -.2055786    .115482    -1.78   0.125    -.4881529    .0769956
    Junior Secondary School  |   .0785583    .137085     0.57   0.587    -.2568767    .4139932
    Senior Secondary School  |   .0629729   .0953878     0.66   0.534    -.1704327    .2963786
            Above secondary  |     .21691   .1099776     1.97   0.096    -.0521955    .4860154
                             |
                       relig |
                      Islam  |          0  (omitted)
                             |
                      ethnic |
                     Fulani  |   .0277382   .0842027     0.33   0.753    -.1782984    .2337748
                     Others  |   .0813324   .0812703     1.00   0.356    -.1175289    .2801937
                             |
                     married |
                        Yes  |          0  (omitted)
                             |
                    numwives |
        Two Live-in Partner  |  -.0179234   .1335658    -0.13   0.898     -.344747    .3089002
      Three Live-in Partner  |  -.0317121   .1379952    -0.23   0.826    -.3693742    .3059499
       Four Live-in Partner  |   .2230525   .1719543     1.30   0.242    -.1977045    .6438095
                             |
                    childnum |
                  One Child  |   .0407261   .0539371     0.76   0.479    -.0912532    .1727054
               Two Children  |   .1563408   .0857388     1.82   0.118    -.0534544     .366136
     Three or more Children  |   .1277884   .1239112     1.03   0.342    -.1754115    .4309883
                             |
                      period |
                    Endline  |   .6926687    .149576     4.63   0.004     .3266694    1.058668
                       _cons |   2.840348   .1763955    16.10   0.000     2.408724    3.271972
    ------------------------------------------------------------------------------------------
    Note: ATET estimate adjusted for covariates, group effects, and time effects.

  • #2
    Usually, you will have no interest in interpreting the coefficients on control variables. These are variables whose effects need to be accounted for but are of no immediate interest to your study. Unless you consider them to be your covariates of interest, in which case they are not control variables. For coefficients on categorical variables, the interpretation is in reference to the omitted (base) category and reflect differences. This is the same for coefficients from didregress or regress, so the estimator does not change the interpretation.

    Code:
    sysuse auto
    regress price i.rep78
    Res.:

    Code:
    . regress price i.rep78
    
          Source |       SS           df       MS      Number of obs   =        69
    -------------+----------------------------------   F(4, 64)        =      0.24
           Model |  8360542.63         4  2090135.66   Prob > F        =    0.9174
        Residual |   568436416        64     8881819   R-squared       =    0.0145
    -------------+----------------------------------   Adj R-squared   =   -0.0471
           Total |   576796959        68  8482308.22   Root MSE        =    2980.2
    
    ------------------------------------------------------------------------------
           price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           rep78 |
              2  |   1403.125   2356.085     0.60   0.554    -3303.696    6109.946
              3  |   1864.733   2176.458     0.86   0.395    -2483.242    6212.708
              4  |       1507   2221.338     0.68   0.500    -2930.633    5944.633
              5  |     1348.5   2290.927     0.59   0.558    -3228.153    5925.153
                 |
           _cons |     4564.5   2107.347     2.17   0.034     354.5913    8774.409
    ------------------------------------------------------------------------------
    The reference group is repair record=1. Cars with repair record=2 on average cost 1403 dollars more than cars with record=1. margins will give you the average prices, and you can verify that the coefficients reflect differences in price (the outcome).

    Code:
    sysuse auto
    qui regress price i.rep78
    margins rep78, post
    display _b[2.rep78]- _b[1.rep78]
    Res.:

    Code:
    . margins rep78, post
    
    Adjusted predictions                            Number of obs     =         69
    Model VCE    : OLS
    
    Expression   : Linear prediction, predict()
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |     Margin   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           rep78 |
              1  |     4564.5   2107.347     2.17   0.034     354.5913    8774.409
              2  |   5967.625   1053.673     5.66   0.000     3862.671    8072.579
              3  |   6429.233   544.1145    11.82   0.000      5342.24    7516.227
              4  |     6071.5   702.4489     8.64   0.000     4668.197    7474.803
              5  |       5913   898.5756     6.58   0.000     4117.889    7708.111
    ------------------------------------------------------------------------------
    
    
    
    . display _b[2.rep78]- _b[1.rep78]
    1403.125
    Once you include additional covariates, the interpretation does not change except you note that such differences are after holding constant other covariates. On your estimation:


    Number of groups and treatment time

    Time variable: period
    Control: kd_did = 0
    Treatment: kd_did = 1
    -----------------------------------
    | Control Treatment
    -------------+---------------------
    Group |
    facname | 3 4
    -------------+---------------------
    Time |
    Minimum | 0 1
    Maximum | 0 1
    -----------------------------------

    Difference-in-differences regression Number of obs = 321
    Data type: Repeated cross-sectional

    (Std. err. adjusted for 7 clusters in facname)
    ------------------------------------------------------------------------------------------
    | Robust
    selfefficacy | Coefficient std. err. t P>|t| [95% conf. interval]
    -------------------------+----------------------------------------------------------------
    7 clusters are too few, so run the regression using regress and do not cluster the standard errors.
    Last edited by Andrew Musau; 02 May 2023, 05:15.

    Comment


    • #3
      Originally posted by Andrew Musau View Post
      Usually, you will have no interest in interpreting the coefficients on control variables. These are variables whose effects need to be accounted for but are of no immediate interest to your study. Unless you consider them to be your covariates of interest, in which case they are not control variables. For coefficients on categorical variables, the interpretation is in reference to the omitted (base) category and reflect differences. This is the same for coefficients from didregress or regress, so the estimator does not change the interpretation.

      Code:
      sysuse auto
      regress price i.rep78
      Res.:

      Code:
      . regress price i.rep78
      
      Source | SS df MS Number of obs = 69
      -------------+---------------------------------- F(4, 64) = 0.24
      Model | 8360542.63 4 2090135.66 Prob > F = 0.9174
      Residual | 568436416 64 8881819 R-squared = 0.0145
      -------------+---------------------------------- Adj R-squared = -0.0471
      Total | 576796959 68 8482308.22 Root MSE = 2980.2
      
      ------------------------------------------------------------------------------
      price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      rep78 |
      2 | 1403.125  2356.085 0.60 0.554 -3303.696 6109.946
      3 | 1864.733 2176.458 0.86 0.395 -2483.242 6212.708
      4 | 1507 2221.338 0.68 0.500 -2930.633 5944.633
      5 | 1348.5 2290.927 0.59 0.558 -3228.153 5925.153
      |
      _cons | 4564.5 2107.347 2.17 0.034 354.5913 8774.409
      ------------------------------------------------------------------------------
      The reference group is repair record=1. Cars with repair record=2 on average cost 1403 dollars more than cars with record=1. margins will give you the average prices, and you can verify that the coefficients reflect differences in price (the outcome).

      Code:
      sysuse auto
      qui regress price i.rep78
      margins rep78, post
      display _b[2.rep78]- _b[1.rep78]
      Res.:

      Code:
      . margins rep78, post
      
      Adjusted predictions Number of obs = 69
      Model VCE : OLS
      
      Expression : Linear prediction, predict()
      
      ------------------------------------------------------------------------------
      | Delta-method
      | Margin Std. Err. t P>|t| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      rep78 |
      1 |  4564.5 2107.347 2.17 0.034 354.5913 8774.409
      2 | 5967.625 1053.673 5.66 0.000 3862.671 8072.579
      3 | 6429.233 544.1145 11.82 0.000 5342.24 7516.227
      4 | 6071.5 702.4489 8.64 0.000 4668.197 7474.803
      5 | 5913 898.5756 6.58 0.000 4117.889 7708.111
      ------------------------------------------------------------------------------
      
      
      
      . display _b[2.rep78]- _b[1.rep78]
      1403.125
      Once you include additional covariates, the interpretation does not change except you note that such differences are after holding constant other covariates. On your estimation:


      7 clusters are too few, so run the regression using regress and do not cluster the standard errors.
      Thank you. I tried to use dataex to generate sample data but the data that is being generated is not sufficient (giving collinearity) to run the model. If I am to use regress command as suggested, is it ok to use it the way stated below?

      The variable kd_did is the DiD variable. facname were the groups I used as clusters initially. And if I am to run a Linear probability model for the DiD, how do you think I can go about it.

      Code:
      reg selfefficacy i.kd_did i.age i.highedulevel i.relig i.ethnic i.married i.numwives i.childnum i.period [pw=kdweight] if state==2, absorb(facname)
      Thanks.

      Edit: I now have the data attached.

      Result using didregress
      Code:
       didregress (selfefficacy i.age i.highedulevel i.relig i.ethnic i.married i.numwives i.childnum) (kd_did) [pw=kdweight] if stat
      > e==2, group(facname) time(period) level(95) aeq
      (sum of wgt is 396.6467496156693)
      note: 2.relig omitted because of collinearity.
      note: 1.married omitted because of collinearity.
      
      Number of groups and treatment time
      
      Time variable: period
      Control:       kd_did = 0
      Treatment:     kd_did = 1
      -----------------------------------
                   |   Control  Treatment
      -------------+---------------------
      Group        |
           facname |         3          4
      -------------+---------------------
      Time         |
           Minimum |         0          1
           Maximum |         0          1
      -----------------------------------
      
      Difference-in-differences regression                       Number of obs = 320
      Data type: Repeated cross-sectional
      
                                                  (Std. err. adjusted for 7 clusters in facname)
      ------------------------------------------------------------------------------------------
                               |               Robust
                  selfefficacy | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
      -------------------------+----------------------------------------------------------------
      ATET                     |
                        kd_did |
                     (1 vs 0)  |   -.273193   .1474349    -1.85   0.113    -.6339532    .0875672
      -------------------------+----------------------------------------------------------------
      Controls                 |
                           age |
                           16  |  -.0101494   .0739425    -0.14   0.895    -.1910802    .1707814
                           17  |   .1040081   .0648539     1.60   0.160    -.0546836    .2626999
                           18  |   .0267201   .0575558     0.46   0.659     -.114114    .1675541
                           19  |   .0100784   .0387044     0.26   0.803    -.0846278    .1047845
                               |
                  highedulevel |
                   Islamiyyah  |  -.1035827   .1616649    -0.64   0.545    -.4991624     .291997
                      Primary  |  -.2038598   .1157022    -1.76   0.129    -.4869729    .0792533
      Junior Secondary School  |   .0788767   .1371814     0.57   0.586     -.256794    .4145473
      Senior Secondary School  |   .0643496   .0942571     0.68   0.520    -.1662892    .2949885
              Above secondary  |   .2182723   .1091945     2.00   0.093    -.0489169    .4854616
                               |
                         relig |
                        Islam  |          0  (omitted)
                               |
                        ethnic |
                       Fulani  |   .0276854   .0847394     0.33   0.755    -.1796645    .2350353
                       Others  |   .0806322   .0809377     1.00   0.358    -.1174152    .2786795
                               |
                       married |
                          Yes  |          0  (omitted)
                               |
                      numwives |
          Two Live-in Partner  |  -.0155634   .1314797    -0.12   0.910    -.3372826    .3061558
        Three Live-in Partner  |  -.0234938   .1332185    -0.18   0.866    -.3494677    .3024801
         Four Live-in Partner  |   .2243047   .1709662     1.31   0.237    -.1940346     .642644
                               |
                      childnum |
                    One Child  |   .0467098   .0495626     0.94   0.382    -.0745655    .1679851
                 Two Children  |   .1570202   .0858998     1.83   0.117    -.0531689    .3672094
       Three or more Children  |   .1287294   .1236743     1.04   0.338    -.1738908    .4313496
                               |
                        period |
                      Endline  |   .6948858   .1528207     4.55   0.004     .3209471    1.068824
                         _cons |   2.832696   .1699891    16.66   0.000     2.416748    3.248645
      ------------------------------------------------------------------------------------------
      Note: ATET estimate adjusted for covariates, group effects, and time effects.
      Using regress
      Code:
      . reg selfefficacy i.kd_did i.age i.highedulevel i.relig i.ethnic i.married i.numwives i.childnum i.period [pw=kdweight] if stat
      > e==2, absorb(facname)
      (sum of wgt is 396.6467496156693)
      note: 2.relig omitted because of collinearity.
      note: 1.married omitted because of collinearity.
      
      Linear regression, absorbing indicators         Number of obs     =        320
                                                      F(19, 294)        =      12.33
                                                      Prob > F          =     0.0000
                                                      R-squared         =     0.5279
                                                      Adj R-squared     =     0.4878
                                                      Root MSE          =     .42076
      
      ------------------------------------------------------------------------------------------
                               |               Robust
                  selfefficacy | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
      -------------------------+----------------------------------------------------------------
                      1.kd_did |   -.273193   .1129154    -2.42   0.016     -.495418   -.0509679
                               |
                           age |
                           16  |  -.0101494   .2325682    -0.04   0.965    -.4678589    .4475601
                           17  |   .1040081   .2061823     0.50   0.614    -.3017722    .5097885
                           18  |   .0267201   .1996899     0.13   0.894    -.3662829     .419723
                           19  |   .0100784   .2017221     0.05   0.960     -.386924    .4070808
                               |
                  highedulevel |
                   Islamiyyah  |  -.1035827   .1118416    -0.93   0.355    -.3236943    .1165289
                      Primary  |  -.2038598   .1087495    -1.87   0.062    -.4178859    .0101663
      Junior Secondary School  |   .0788767   .1256183     0.63   0.531    -.1683484    .3261017
      Senior Secondary School  |   .0643496   .1142197     0.56   0.574    -.1604423    .2891415
              Above secondary  |   .2182723   .1191757     1.83   0.068    -.0162733     .452818
                               |
                         relig |
                        Islam  |          0  (omitted)
                               |
                        ethnic |
                       Fulani  |   .0276854   .0949095     0.29   0.771    -.1591027    .2144736
                       Others  |   .0806322   .0939177     0.86   0.391     -.104204    .2654683
                               |
                       married |
                          Yes  |          0  (omitted)
                               |
                      numwives |
          Two Live-in Partner  |  -.0155634   .1530085    -0.10   0.919    -.3166942    .2855674
        Three Live-in Partner  |  -.0234938   .1699957    -0.14   0.890    -.3580565    .3110688
         Four Live-in Partner  |   .2243047   .1719389     1.30   0.193    -.1140824    .5626918
                               |
                      childnum |
                    One Child  |   .0467098   .1538945     0.30   0.762    -.2561647    .3495843
                 Two Children  |   .1570202   .1426686     1.10   0.272    -.1237609    .4378014
       Three or more Children  |   .1287294   .1491313     0.86   0.389    -.1647709    .4222297
                               |
                        period |
                      Endline  |   .6948858   .0607228    11.44   0.000     .5753793    .8143922
                         _cons |   2.832696   .3156044     8.98   0.000     2.211566    3.453827
      ------------------------------------------------------------------------------------------
      Attached Files
      Last edited by Kehinde Atoloye; 02 May 2023, 12:50.

      Comment


      • #4
        I can see an improvement in the SE using the regress command as done below:

        Code:
        reg selfefficacy i.kd_did i.age i.highedulevel i.relig i.ethnic i.married i.numwives i.childnum i.period [pw=kdweight] if state==2
        
        (sum of wgt is 396.6467496156693)
        note: 2.relig omitted because of collinearity.
        note: 1.married omitted because of collinearity.
        
        Linear regression                               Number of obs     =        320
                                                        F(19, 300)        =      14.08
                                                        Prob > F          =     0.0000
                                                        R-squared         =     0.4540
                                                        Root MSE          =     .44799
        
        ------------------------------------------------------------------------------------------
                                 |               Robust
                    selfefficacy | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
        -------------------------+----------------------------------------------------------------
                        1.kd_did |  -.0420407   .0874437    -0.48   0.631    -.2141214    .1300399
                                 |
                             age |
                             16  |   .1270518   .2437499     0.52   0.603    -.3526243    .6067279
                             17  |   .2161447   .2197196     0.98   0.326    -.2162421    .6485314
                             18  |   .1923694   .2143524     0.90   0.370    -.2294554    .6141942
                             19  |   .1812932   .2130685     0.85   0.396     -.238005    .6005914
                                 |
                    highedulevel |
                     Islamiyyah  |  -.1391697   .0969444    -1.44   0.152    -.3299469    .0516075
                        Primary  |  -.2073304   .1008262    -2.06   0.041    -.4057467   -.0089142
        Junior Secondary School  |   .2452991   .1141865     2.15   0.032     .0205912    .4700071
        Senior Secondary School  |   .2861957   .1018386     2.81   0.005     .0857871    .4866042
                Above secondary  |   .4216331   .1140412     3.70   0.000     .1972111    .6460551
                                 |
                           relig |
                          Islam  |          0  (omitted)
                                 |
                          ethnic |
                         Fulani  |   .0503392     .10526     0.48   0.633    -.1568024    .2574808
                         Others  |   .1401929   .0970596     1.44   0.150    -.0508109    .3311967
                                 |
                         married |
                            Yes  |          0  (omitted)
                                 |
                        numwives |
            Two Live-in Partner  |   .0511507   .1832559     0.28   0.780     -.309479    .4117805
          Three Live-in Partner  |   .0598277   .1981926     0.30   0.763    -.3301962    .4498516
           Four Live-in Partner  |   .3050586    .207417     1.47   0.142     -.103118    .7132352
                                 |
                        childnum |
                      One Child  |  -.0368033    .162679    -0.23   0.821    -.3569399    .2833332
                   Two Children  |   .0735242   .1467123     0.50   0.617    -.2151915    .3622399
         Three or more Children  |   .0556951   .1523769     0.37   0.715    -.2441679    .3555581
                                 |
                          period |
                        Endline  |   .6302724   .0590465    10.67   0.000     .5140746    .7464702
                           _cons |   2.598166   .3389131     7.67   0.000     1.931218    3.265114
        ------------------------------------------------------------------------------------------

        Comment


        • #5
          The second regression in #3 that yields the same coefficient on the treatment variable replicates the output of didregress. That is precisely the linear probability model given that your ourcome is binary 0/1. So go for that as it does not make sense to cluster the standard errors with only 7 clusters. Your last regression excludes the group effects - which are included in the regressions in #3.

          Comment


          • #6
            Originally posted by Andrew Musau View Post
            The second regression in #3 that yields the same coefficient on the treatment variable replicates the output of didregress. That is precisely the linear probability model given that your ourcome is binary 0/1. So go for that as it does not make sense to cluster the standard errors with only 7 clusters. Your last regression excludes the group effects - which are included in the regressions in #3.
            Thank you very much. Please, any idea of what one can do if the model's reliability is as low as 0.8% (R-square Adj.) ?

            Comment


            • #7
              Where do you get 0.8% from?

              Comment


              • #8
                Originally posted by Andrew Musau View Post
                Where do you get 0.8% from?
                I actually fitted other models with different outcomes outside the outcome variable I posted here and was having Rsquares as low as 1% among them.

                Comment


                • #9
                  On the surface, that value seems low for a linear probability model. What range do other similar studies in the literature report? If these are much larger, then you may have some omitted variables or some other specification error. On the other hand, it may just be that you can explain very little of the phenomenon that you are studying. One needs to know more about the data and topic to give useful advice.

                  Comment

                  Working...
                  X