Announcement

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

  • Coefficient interpretation from a GLM regression family(gamma) link(log)

    Hi all,

    I am trying to explain some coefficients from a GLM regression with family(gamma) link(log), I did read that for coefficients I need transform to a exp(b1). But I am more interesting in dy/dx results. I need to transforms this results too?, some example of my results are:

    Code:
    
    . sysuse auto
    (1978 Automobile Data)
    
    .
    . glm mpg weight length displacement , family(gamma) link(log)
    
    Iteration 0:   log likelihood =  -298.5288  
    Iteration 1:   log likelihood = -298.52698  
    Iteration 2:   log likelihood = -298.52698  
    
    Generalized linear models                          No. of obs      =        74
    Optimization     : ML                              Residual df     =        70
                                                       Scale parameter =  .0214501
    Deviance         =  1.422701405                    (1/df) Deviance =  .0203243
    Pearson          =  1.501510196                    (1/df) Pearson  =  .0214501
    
    Variance function: V(u) = u^2                      [Gamma]
    Link function    : g(u) = ln(u)                    [Log]
    
                                                       AIC             =  8.176405
    Log likelihood   = -298.5269823                    BIC             = -299.8619
    
    ------------------------------------------------------------------------------
                 |                 OIM
             mpg |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          weight |  -.0001956   .0000818    -2.39   0.017    -.0003559   -.0000352
          length |  -.0033186    .002328    -1.43   0.154    -.0078814    .0012441
    displacement |   5.40e-06   .0004179     0.01   0.990    -.0008136    .0008245
           _cons |    4.24724   .2591944    16.39   0.000     3.739228    4.755251
    ------------------------------------------------------------------------------
    
    .
    . margins, dydx(*)
    
    Average marginal effects                          Number of obs   =         74
    Model VCE    : OIM
    
    Expression   : Predicted mean mpg, predict()
    dy/dx w.r.t. : weight length displacement
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          weight |  -.0041641   .0017465    -2.38   0.017    -.0075871    -.000741
          length |  -.0706644   .0496204    -1.42   0.154    -.1679186    .0265898
    displacement |    .000115   .0088983     0.01   0.990    -.0173252    .0175553
    ------------------------------------------------------------------------------
    Any comments I will grateful
    Thanks In advance

  • #2
    Rodrigo: If your interest is in the marginal effects of the x's on E[y|x] then your margins, dydx(*) command should suffice. No need for any transformations/retransformations.

    Comment


    • #3
      Thanks John Mullahy for you reply, just 2 questions:

      1) marginal effects have the same units that original variables?
      2) just for curiosity if I want use regression coefficients I need to transform: exp(b1), the units are the same that original variables?

      Thanks in advance

      Comment


      • #4
        You might find this answer useful. -margins- can do all three, while -eform- option with -glm- or -nlcom- can do the third.
        Last edited by Dimitriy V. Masterov; 01 May 2019, 19:57.

        Comment


        • #5
          Thanks Dimitriy your explanation in Cross validated is great!

          Comment

          Working...
          X