Announcement

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

  • negative coefficients for regressions with ln(var) as dependend variable

    I have a panel dataset with the number of deliveries by health facility - day of week - year - month. I would like to know the effect of a dummy for Friday (d_6a) on the number of deliveries (npar), with year, month and year/month fixed effects as well as with health facility fixed effect. I also included a number of control variables.

    I found a negative effect and compared it to the mean of the dependend variable in weekdays other than Friday. The effect of d_6a on npar corresponded to a 75% drop. In order to have a straight idea of the effect proportion, I also ran the regression for the log of the number of deliveries (lnpar). However I got a -2 coefficient for d_6a! Anyone could explain me why this effect is not close to -0.75 and how should I interpret coefficients < -1 in regressions where the dependend variable is a ln?

    Code:
    areg npar d_6a $control i.ano##i.mes, absorb(cnes) vce(robust) 
    
    areg lnpar d_6a $control i.ano##i.mes, absorb(cnes) vce(robust)

  • #2
    Paula:
    you would be better off with posting not only what you typed , but also what Stata gave you back for the two regression models.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Paula,

      Adding to Carlo's most helpful advice, I would say that there is no reason to expect comparable results form the two regressions because these are models for two related but very different variables. A much more meaningful comparison (and possibly a better approach) would be to estimate a model for npar using Poisson regression. After all, you want to model a count.

      All the best,

      Joao

      Comment


      • #4
        Thank you!

        Below are the results from both models. Actually, in my database I only have Mondays and Fridays (Business and Holidays) and you would like to know the effect of Business Day (d_dtutil_e) on the number (of ln) of deliveries, controlling for weekday. I am interested in interpreting the coefficient d_dtutil_e.


        Code:
        . areg npar d_dtutil_e d_6a $control i.ano##i.mes, absorb(cnes) vce(robust)
        
        Linear regression, absorbing indicators           Number of obs   =      87722
                                                          F(  44,  85833) =     288.10
                                                          Prob > F        =     0.0000
                                                          R-squared       =     0.8466
                                                          Adj R-squared   =     0.8432
                                                          Root MSE        =     7.0575
        
        ------------------------------------------------------------------------------
                     |               Robust
                npar |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
          d_dtutil_e |  -12.55757   .1696023   -74.04   0.000    -12.88999   -12.22515
                d_6a |  -1.917524   .0456435   -42.01   0.000    -2.006985   -1.828063
          d_peso2500 |  -.3174739   .2004676    -1.58   0.113    -.7103888    .0754409
          d_peso4000 |   .0800445   .2164405     0.37   0.712     -.344177     .504266
         d_semgest37 |  -.5405435   .1458994    -3.70   0.000     -.826505    -.254582
         d_semgest41 |   .0177239   .1993672     0.09   0.929    -.3730341    .4084819
        d_idademae18 |  -.1515853   .1514155    -1.00   0.317    -.4483583    .1451877
        d_idademae35 |  -.0820754   .1729455    -0.47   0.635    -.4210472    .2568963
             d_pcant |   .5880099   .1010192     5.82   0.000     .3900132    .7860066
             prenat2 |  -.5620942    .405703    -1.39   0.166    -1.357269    .2330802
             prenat3 |    .020733   .3780707     0.05   0.956    -.7202824    .7617484
             prenat4 |   -.052236   .3734584    -0.14   0.889    -.7842114    .6797394
          d_prenat3m |   .1739314   .1069266     1.63   0.104    -.0356438    .3835067
             d_sexom |   .0479325   .0882929     0.54   0.587    -.1251207    .2209858
        d_racacorbra |  -.0243426   .1098581    -0.22   0.825    -.2396636    .1909784
          d_escmae12 |  -.2756322   .1388586    -1.98   0.047    -.5477939   -.0034705
         d_estcivcas |  -.0733498   .0980369    -0.75   0.454    -.2655012    .1188017
           d_cnesneo |  -.2454327   .2969392    -0.83   0.408     -.827431    .3365657
             nmedobs |   .0263626   .0168592     1.56   0.118    -.0066813    .0594065
             nmedneo |    .029586    .014625     2.02   0.043      .000921    .0582509
             nmedane |  -.0081022   .0137267    -0.59   0.555    -.0350065    .0188021
                     |
                 ano |
               2013  |  -1.397338   .1549559    -9.02   0.000    -1.701051   -1.093626
                     |
                 mes |
                  2  |  -2.871454   .1710591   -16.79   0.000    -3.206728    -2.53618
                  3  |   2.060784   .1920828    10.73   0.000     1.684303    2.437265
                  4  |  -2.907916   .1785475   -16.29   0.000    -3.257868   -2.557965
                  5  |  -.7307056   .1609664    -4.54   0.000    -1.046198   -.4152129
                  6  |  -1.478277   .1743736    -8.48   0.000    -1.820048   -1.136506
                  7  |   .1862598   .1719856     1.08   0.279    -.1508306    .5233501
                  8  |  -.3597802   .1706104    -2.11   0.035    -.6941752   -.0253852
                  9  |  -3.265912   .1635762   -19.97   0.000     -3.58652   -2.945304
                 10  |  -1.646695   .1890534    -8.71   0.000    -2.017238   -1.276152
                 11  |  -3.614428   .1770007   -20.42   0.000    -3.961348   -3.267508
                 12  |  -2.891299   .1740947   -16.61   0.000    -3.232523   -2.550074
                     |
             ano#mes |
            2013  2  |   1.649541   .2165027     7.62   0.000     1.225197    2.073884
            2013  3  |  -.9358664   .2315822    -4.04   0.000    -1.389766   -.4819672
            2013  4  |   5.894313    .234247    25.16   0.000     5.435191    6.353435
            2013  5  |   1.514865   .2178615     6.95   0.000     1.087858    1.941871
            2013  6  |   1.899714   .2152024     8.83   0.000     1.477919    2.321509
            2013  7  |   1.702491   .2256979     7.54   0.000     1.260125    2.144857
            2013  8  |   1.774801   .2213867     8.02   0.000     1.340885    2.208717
            2013  9  |   5.279996   .2231438    23.66   0.000     4.842636    5.717356
            2013 10  |   1.084696   .2281348     4.75   0.000     .6375539    1.531839
            2013 11  |   3.029315   .2174068    13.93   0.000     2.603199     3.45543
            2013 12  |   4.352979   .2219238    19.61   0.000      3.91801    4.787948
                     |
               _cons |   18.11945    .499001    36.31   0.000     17.14141    19.09749
        -------------+----------------------------------------------------------------
                cnes |   absorbed                                    (1845 categories)
        
        . sum npar if d_dtutil_e==0 & e(sample)==1
        
            Variable |       Obs        Mean    Std. Dev.       Min        Max
        -------------+--------------------------------------------------------
                npar |     81262    16.64897    18.18894          1        266
        
        . areg lnpar d_dtutil_e d_6a $control i.ano##i.mes, absorb(cnes) vce(robust)
        
        Linear regression, absorbing indicators           Number of obs   =      87722
                                                          F(  44,  85833) =     839.14
                                                          Prob > F        =     0.0000
                                                          R-squared       =     0.8001
                                                          Adj R-squared   =     0.7957
                                                          Root MSE        =     0.4714
        
        ------------------------------------------------------------------------------
                     |               Robust
               lnpar |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
          d_dtutil_e |  -1.200422   .0081496  -147.30   0.000    -1.216395   -1.184449
                d_6a |  -.1490805   .0032022   -46.56   0.000    -.1553568   -.1428043
          d_peso2500 |   .0243494   .0231402     1.05   0.293    -.0210052     .069704
          d_peso4000 |   .0156796   .0252835     0.62   0.535    -.0338758    .0652351
         d_semgest37 |  -.0476958   .0174634    -2.73   0.006    -.0819239   -.0134676
         d_semgest41 |  -.0180504   .0251868    -0.72   0.474    -.0674162    .0313155
        d_idademae18 |   .0038281   .0188623     0.20   0.839    -.0331419    .0407981
        d_idademae35 |  -.0017736   .0212557    -0.08   0.934    -.0434345    .0398873
             d_pcant |   .0964567   .0111773     8.63   0.000     .0745492    .1183641
             prenat2 |   -.255144   .0400169    -6.38   0.000    -.3335769   -.1767112
             prenat3 |  -.1936965   .0355856    -5.44   0.000    -.2634441    -.123949
             prenat4 |  -.1913688   .0349018    -5.48   0.000    -.2597761   -.1229616
          d_prenat3m |   .0309714   .0120302     2.57   0.010     .0073922    .0545505
             d_sexom |   .0020942   .0111203     0.19   0.851    -.0197016      .02389
        d_racacorbra |  -.0029898   .0129574    -0.23   0.818    -.0283862    .0224065
          d_escmae12 |   .0164076   .0173452     0.95   0.344    -.0175889     .050404
         d_estcivcas |  -.0165534   .0114395    -1.45   0.148    -.0389746    .0058679
           d_cnesneo |  -.0041695   .0177336    -0.24   0.814    -.0389272    .0305881
             nmedobs |   .0007135   .0004397     1.62   0.105    -.0001484    .0015754
             nmedneo |   .0019703   .0004836     4.07   0.000     .0010224    .0029183
             nmedane |  -.0001139   .0005792    -0.20   0.844    -.0012491    .0010213
                     |
                 ano |
               2013  |  -.0703405   .0113297    -6.21   0.000    -.0925467   -.0481344
                     |
                 mes |
                  2  |  -.1631165   .0122179   -13.35   0.000    -.1870635   -.1391695
                  3  |   .1286083   .0114198    11.26   0.000     .1062256    .1509911
                  4  |  -.1783321   .0113061   -15.77   0.000     -.200492   -.1561723
                  5  |  -.0198188   .0113107    -1.75   0.080    -.0419877      .00235
                  6  |   -.080728   .0111318    -7.25   0.000    -.1025463   -.0589097
                  7  |   .0169811   .0113347     1.50   0.134    -.0052348    .0391971
                  8  |   .0007081   .0114952     0.06   0.951    -.0218225    .0232386
                  9  |  -.1933221   .0116628   -16.58   0.000    -.2161811    -.170463
                 10  |  -.1346091   .0121853   -11.05   0.000    -.1584923    -.110726
                 11  |  -.2486097   .0111955   -22.21   0.000    -.2705527   -.2266667
                 12  |  -.1450614   .0117277   -12.37   0.000    -.1680476   -.1220752
                     |
             ano#mes |
            2013  2  |   .0748946   .0166035     4.51   0.000     .0423518    .1074374
            2013  3  |  -.0569528    .015678    -3.63   0.000    -.0876816   -.0262241
            2013  4  |   .3482526   .0154936    22.48   0.000     .3178852    .3786201
            2013  5  |   .0584449   .0153362     3.81   0.000      .028386    .0885038
            2013  6  |   .0991693   .0154655     6.41   0.000     .0688569    .1294816
            2013  7  |   .0820207   .0157101     5.22   0.000     .0512291    .1128123
            2013  8  |   .0668533   .0158189     4.23   0.000     .0358484    .0978581
            2013  9  |   .2947295   .0158662    18.58   0.000     .2636318    .3258273
            2013 10  |   .0901476   .0163777     5.50   0.000     .0580476    .1222477
            2013 11  |   .1975134   .0156102    12.65   0.000     .1669175    .2281093
            2013 12  |   .2250646   .0160098    14.06   0.000     .1936856    .2564436
                     |
               _cons |   2.594818   .0395416    65.62   0.000     2.517317    2.672319
        -------------+----------------------------------------------------------------
                cnes |   absorbed                                    (1845 categories)
        
        . sum lnpar if d_dtutil_e==0 & e(sample)==1
        
            Variable |       Obs        Mean    Std. Dev.       Min        Max
        -------------+--------------------------------------------------------
               lnpar |     81262    2.334717    1.009288          0   5.583496

        Comment


        • #5
          Paula:
          -one step aside: if you have count data in your depvar, why going -reg- instead of -poisson- (and why not using an -xt- regression model, since you have panel data?);
          - the outcome of the first regression model tells you that, when adjusted for th oher predictors, moving from (week-end?) to business days reduces -npar- by 1.20;
          the outcome of the second regression model tells you that, when adjusted for th oher predictors, moving from (week-end?) to business days reduces -ln_npar- (which differs from -npar-) by [1-exp(-1.20)]=70%;
          - I'm wondering whether creating a dummy via -fvvarlist- to include working days (1) and week-end (0) might contribute to make things a little simpler.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Hello Carlo.
            It is true that I could you -xt- regression. But would that make any diffenrece at all?
            I did not follow your second point. I was given the following interpretation for the two regressions: The first regression indicates that mooving from a Monday/Friday Holiday to a Monday/Friday business day reduces the total number of deliveries in 12. Given the mean of 16.6 deliveries/day, this corresponds to a decrease of 75%. The second regression tells me the decrease is of 120% or 30 deliveries [exp(-1.2)]. Am I totally wrong?

            Comment


            • #7
              Paula:
              -perhaps -xt- would not make any difference, but I would have explored; anyway
              - first regression model outcome: your interpretation is right: I misread 1.20 instead of 12.5;
              - second regression model: I would stick with my previous 70%; for value higher that |0.2| reading the expected proportional variation in ln_depvar for an one-unit variation in indepvar directly from the coefficients can be misleading (see for instance: http://eu.wiley.com/WileyCDA/WileyTi...470380039.html, page 142.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment

              Working...
              X