Announcement

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

  • Problem: margins command produces AME results with different p-values to the original xtgee family(nbinomial 1) regression

    Dear Statalist,

    I am trying to obtain average marginal effects from a population-averaged negative binomial regression.

    I ran the following:

    Code:
    . xtgee cnrparticipants ///
    > sqrt_cnrdeaths ///
    > pulparticipants_lagged ///
    > pulpop_pcent ///
    > pulpop_pcent_sq ///
    > popchange ///
    > popchange_squared ///
    > unemployment_ratio ///
    > cnrworker ///
    > hbclaimants ///
    > cnrdegree ///
    > cnrparticipants_lagged ///
    > electionyear_a ///
    > , family(nbinomial 1) exposure(cnrpop) vce(robust) ///
    > corr(ind)
    
    Iteration 1: tolerance = 7.528e-07
    
    GEE population-averaged model                   Number of obs     =      1,390
    Group variable:               settlementid      Number of groups  =        139
    Link:                                  log      Obs per group:
    Family:             negative binomial(k=1)                    min =         10
    Correlation:                   independent                    avg =       10.0
                                                                  max =         10
                                                    Wald chi2(12)     =     262.93
    Scale parameter:                         1      Prob > chi2       =     0.0000
    
    Pearson chi2(1390):               51831.07      Deviance          =    7213.68
    Dispersion (Pearson):             37.28854      Dispersion        =   5.189696
    
                                         (Std. Err. adjusted for clustering on settlementid)
    ----------------------------------------------------------------------------------------
                           |             Semirobust
           cnrparticipants |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -----------------------+----------------------------------------------------------------
            sqrt_cnrdeaths |  -.1507375   .0740523    -2.04   0.042    -.2958774   -.0055976
    pulparticipants_lagged |   .0125712    .003579     3.51   0.000     .0055564    .0195859
              pulpop_pcent |   -.076741    .039356    -1.95   0.051    -.1538773    .0003954
           pulpop_pcent_sq |   .0004652   .0004765     0.98   0.329    -.0004687    .0013991
                 popchange |  -.1993546   .4461408    -0.45   0.655    -1.073775    .6750654
         popchange_squared |  -.0681788   .1272669    -0.54   0.592    -.3176174    .1812598
        unemployment_ratio |   1.550292   .4837341     3.20   0.001     .6021904    2.498393
                 cnrworker |   .0892763   .0353052     2.53   0.011     .0200794    .1584731
               hbclaimants |  -.0436729    .022623    -1.93   0.054    -.0880132    .0006674
                 cnrdegree |  -.0225913   .0425565    -0.53   0.596    -.1060004    .0608179
    cnrparticipants_lagged |   .0533955   .0115392     4.63   0.000      .030779     .076012
            electionyear_a |  -.1913063   .2326139    -0.82   0.411    -.6472212    .2646085
                     _cons |  -5.327789   1.523732    -3.50   0.000    -8.314249   -2.341329
                ln(cnrpop) |          1  (exposure)
    ----------------------------------------------------------------------------------------
    
    . 
    . margins, dydx(*) post
    
    Average marginal effects                        Number of obs     =      1,390
    Model VCE    : Semirobust
    
    Expression   : Exponentiated linear prediction considering offset, predict()
    dy/dx w.r.t. : sqrt_cnrdeaths pulparticipants_lagged pulpop_pcent pulpop_pcent_sq popchange popchange_squared unemployment_ratio
                   cnrworker hbclaimants cnrdegree cnrparticipants_lagged electionyear_a
    
    ----------------------------------------------------------------------------------------
                           |            Delta-method
                           |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -----------------------+----------------------------------------------------------------
            sqrt_cnrdeaths |  -2501.737   3338.087    -0.75   0.454    -9044.267    4040.793
    pulparticipants_lagged |   208.6391   229.0139     0.91   0.362    -240.2199    657.4981
              pulpop_pcent |  -1273.642   1640.604    -0.78   0.438    -4489.167    1941.883
           pulpop_pcent_sq |   7.720792   13.53815     0.57   0.568     -18.8135    34.25509
                 popchange |  -3308.617   8823.409    -0.37   0.708    -20602.18    13984.95
         popchange_squared |  -1131.539   2667.132    -0.42   0.671    -6359.022    4095.944
        unemployment_ratio |   25729.64   25755.41     1.00   0.318    -24750.03    76209.31
                 cnrworker |   1481.686   1602.212     0.92   0.355    -1658.592    4621.964
               hbclaimants |  -724.8237   910.6557    -0.80   0.426    -2509.676    1060.029
                 cnrdegree |   -374.939   832.4995    -0.45   0.652    -2006.608     1256.73
    cnrparticipants_lagged |   886.1862   1084.372     0.82   0.414    -1239.145    3011.517
            electionyear_a |  -3175.043   5522.194    -0.57   0.565    -13998.34    7648.259
    ----------------------------------------------------------------------------------------
    As you can see, the p-values of the results obtained from the regression, and from the margins command, are very different. Significant results in the regression are insignificant in the results produced by the margins command.

    My question is, does the difference in p-values indicate that I am doing something wrong, and if so, what corrections should I make?

    Thank you for any and all help provided.

    Best wishes,
    Adam
Working...
X