Announcement

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

  • Interaction omitted for one region, but margins still reports a coefficient

    Dear Stata users,

    I’m running a regression to examine how ESG performance affects firms’ leverage ratios across regions. My model includes an interaction between region and ESGscore:

    reg leverage i.region##c.ESGscore controls...

    In the regression results, Stata omits the interaction for South America, since no firm in that region reports ESG data:


    ESGscore | -.0103867 .0058873 -1.76 0.078 -.0219256 .0011521
    region#c.ESGscore |
    EUROPEAN UNION | .0318336 .0093585 3.40 0.001
    NORTH AMERICA | .0235601 .0082043 2.87 0.004
    OCEANIA | -.0128253 .0157819 -0.81 0.416
    REST OF EUROPE | .0028498 .0096993 0.29 0.769
    SOUTH AMERICA | 0 (omitted)


    But when I compute marginal effects using:

    margins, dydx(ESGscore) over(region)


    Stata still reports a marginal effect for South America:

    SOUTH AMERICA | -.0001096 .0000604 -1.81 0.070 -.0002281 8.83e-06


    I’m trying to understand how margins is producing a dy/dx value for a region that had its interaction term omitted in the main regression so any clarification on how margins handles such omitted interactions when data are missing for a subgroup would be greatly appreciated.

    Thank you in advance for your help !

    Best regards,
    Syrine

  • #2
    Syrine:
    you do not tell the list if the omission in yiour -regress- was due to perfect collinearity.
    If this the case, -margins- (as you coded it) is expected to report a margin of derivatives of response for -SOUTH AMERICA-.
    The following toy-example reports on a similar situation:
    Code:
    sysuse auto.dta
    . regress price i.foreign##i.rep78
    note: 1.foreign#1b.rep78 identifies no observations in the sample.
    note: 1.foreign#2.rep78 identifies no observations in the sample.
    note: 1.foreign#5.rep78 omitted because of collinearity.
    
          Source |       SS           df       MS      Number of obs   =        69
    -------------+----------------------------------   F(7, 61)        =      0.39
           Model |    24684607         7  3526372.43   Prob > F        =    0.9049
        Residual |   552112352        61  9051022.16   R-squared       =    0.0428
    -------------+----------------------------------   Adj R-squared   =   -0.0670
           Total |   576796959        68  8482308.22   Root MSE        =    3008.5
    
    -------------------------------------------------------------------------------
            price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    --------------+----------------------------------------------------------------
          foreign |
         Foreign  |   2088.167   2351.846     0.89   0.378     -2614.64    6790.974
                  |
            rep78 |
               2  |   1403.125   2378.422     0.59   0.557    -3352.823    6159.073
               3  |   2042.574   2204.707     0.93   0.358    -2366.011    6451.159
               4  |   1317.056   2351.846     0.56   0.578    -3385.751    6019.863
               5  |       -360   3008.492    -0.12   0.905    -6375.851    5655.851
                  |
    foreign#rep78 |
       Foreign#1  |          0  (empty)
       Foreign#2  |          0  (empty)
       Foreign#3  |  -3866.574   2980.505    -1.30   0.199    -9826.462    2093.314
       Foreign#4  |  -1708.278   2746.365    -0.62   0.536    -7199.973    3783.418
       Foreign#5  |          0  (omitted)
                  |
            _cons |     4564.5   2127.325     2.15   0.036      310.651    8818.349
    -------------------------------------------------------------------------------
    
    . margins, dydx( foreign) over( rep78 )
    
    Average marginal effects                                    Number of obs = 69
    Model VCE: OLS
    
    Expression: Linear prediction, predict()
    dy/dx wrt:  1.foreign
    Over:       rep78
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |      dy/dx   std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
    0.foreign    |  (base outcome)
    -------------+----------------------------------------------------------------
    1.foreign    |
           rep78 |
              1  |          .  (not estimable)
              2  |          .  (not estimable)
              3  |  -1778.407    1830.91    -0.97   0.335    -5439.538    1882.723
              4  |   379.8889   1418.217     0.27   0.790     -2456.01    3215.788
              5  |   2088.167   2351.846     0.89   0.378     -2614.64    6790.974
    ------------------------------------------------------------------------------
    Note: dy/dx for factor levels is the discrete change from the base level.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Pr.Lazzaro,

      Yes, in fact, it is omitted because of collinearity : "note: 6.region#c.ESGscore omitted because of collinearity "

      Could you please explain to me how this margin is computed? And thank you again for your help!

      Best regards,
      Syrine
      Last edited by Syrine Ayachi; 09 Nov 2025, 03:30.

      Comment


      • #4
        Syrine:
        thanks for clarifyng.
        Please see -Expressing derivatives as elasticities- paragraph, -margins- entry, Stata .pdf manual.
        Last but not least, Carlo in enough ! Thanks.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X