Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: -nbreg- not working properly?


From   "Peter Siminski" <[email protected]>
To   <[email protected]>
Subject   st: -nbreg- not working properly?
Date   Wed, 8 Aug 2007 14:18:54 +1000

Dear count data analysts,

I am puzzled by the following. If I'm not mistaken, -nbreg- (with defaults)
should produce the same results as -glm- with family(nbinomial). But in my
analysis, this is not the case, they are very different. -nbreg- is giving
me results that are almost identical to -poisson- (and -glm- with
family(poisson)). I have pasted the results of -nbreg-, followed by -glm-
family(nbinomial), followed by -poisson-. Note the extremely low alpha
in -nbreg-, which explains why it looks like the -poisson- results. This
would suggest that the data are actually conditionally poisson, but this
would not explain the difference to the -glm- result. I think its unlikely
that my data are actually conditionally poisson, so I tend to believe
the -glm- result over nbreg (though I'm unsure how retreive alpha
from -glm-). Your advice would be appreciated. Am I doing something silly?

Thanks in advance,
Peter.

  nbreg pbs01 yr1 yr2 hcard agecont agecont2 sex y y2 ms hchbp hcchol
diabcond asthcond sa
> h2 sah3 sah4 sah5 [pweight=weight2] if group == 1, cluster(randomid2)

Fitting Poisson model:

Iteration 0:   log pseudolikelihood = -420.43515
Iteration 1:   log pseudolikelihood = -419.99682
Iteration 2:   log pseudolikelihood = -419.99619
Iteration 3:   log pseudolikelihood = -419.99619

Fitting constant-only model:

Iteration 0:   log pseudolikelihood = -550.19552
Iteration 1:   log pseudolikelihood = -548.65093
Iteration 2:   log pseudolikelihood = -548.64639
Iteration 3:   log pseudolikelihood = -548.64639

Fitting full model:

Iteration 0:   log pseudolikelihood = -467.09114
Iteration 1:   log pseudolikelihood = -437.76074
Iteration 2:   log pseudolikelihood = -422.73894
Iteration 3:   log pseudolikelihood = -420.16013
Iteration 4:   log pseudolikelihood = -420.04043
Iteration 5:   log pseudolikelihood = -420.00748
Iteration 6:   log pseudolikelihood = -419.99862
Iteration 7:   log pseudolikelihood = -419.99672
Iteration 8:   log pseudolikelihood = -419.99631
Iteration 9:   log pseudolikelihood = -419.99622
Iteration 10:  log pseudolikelihood =  -419.9962

Negative binomial regression                      Number of obs   =
792
Dispersion           = mean                       Wald chi2(17)   =
512.24
Log pseudolikelihood = -419.9962                  Prob > chi2     =
0.0000

                             (Std. Err. adjusted for 715 clusters in
randomid2)
----------------------------------------------------------------------------
--
              |               Robust
        pbs01 |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
          yr1 |  -.2793689    .109702    -2.55
011    -.4943808    -.064357
          yr2 |  -.4742796   .1160246    -4.09
0.000    -.7016836   -.2468756
        hcard |    .150871    .114099     1.32   0.186    -.0727589
3745009
      agecont |   .2116223   .5903352     0.36   0.720    -.9454134
1.368658
     agecont2 |  -.0012236   .0040618    -0.30   0.763    -.0091846
0067374
          sex |  -.0313338   .0899033    -0.35   0.727     -.207541
1448734
            y |   .0442019   .0684746     0.65   0.519    -.0900059
1784098
           y2 |  -.0028061   .0056018    -0.50   0.616    -.0137854
0081732
           ms |  -.0114624   .0921729    -0.12   0.901     -.192118
1691932
        hchbp |   1.107994   .1076378    10.29   0.000     .8970276
1.31896
       hcchol |   .5759967   .0943939     6.10   0.000     .3909881
7610053
     diabcond |   .5188646   .1149093     4.52   0.000     .2936464
7440828
     asthcond |   .8383796   .1282918     6.53   0.000     .5869324
1.089827
         sah2 |   .2328374   .1673571     1.39   0.164    -.0951764
5608512
         sah3 |   .3755013   .1602553     2.34   0.019     .0614067
6895959
         sah4 |   .6246108   .1723855     3.62   0.000     .2867414
9624801
         sah5 |   .8188331   .2241906     3.65   0.000     .3794275
1.258239
        _cons |  -10.15595   21.43698    -0.47   0.636    -52.17166
31.85977
-------------+--------------------------------------------------------------
--
     /lnalpha |  -15.17458
8177613                     -16.77736   -13.57179
-------------+--------------------------------------------------------------
--
        alpha |   2.57e-07   2.10e-07                      5.17e-08
1.28e-06
----------------------------------------------------------------------------
--

  glm pbs01 yr1 yr2 hcard agecont agecont2 sex y y2 ms hchbp hcchol diabcond
asthcond sah2
>  sah3 sah4 sah5 [pweight=weight2] if group == 1, family(nbinomial)
cluster(randomid2)

Iteration 0:   log pseudolikelihood = -464.94184
Iteration 1:   log pseudolikelihood = -463.24718
Iteration 2:   log pseudolikelihood = -463.24266
Iteration 3:   log pseudolikelihood = -463.24266

Generalized linear models                          No. of obs      =
792
Optimization     : ML                              Residual df     =
774
                                                    Scale parameter =
1
Deviance         =  194.0741705                    (1/df) Deviance =
2507418
Pearson          =  204.4292246                    (1/df) Pearson  =
2641204

Variance function: V(u) = u+(1)u^2                 [Neg. Binomial]
Link function    : g(u) = ln(u)                    [Log]

                                                    AIC             =
1.215259
Log pseudolikelihood = -463.2426575                BIC
             = -4972.036

                             (Std. Err. adjusted for 715 clusters in
randomid2)
----------------------------------------------------------------------------
--
              |               Robust
        pbs01 |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
          yr1 |  -.3866717   .1256955    -3.08
002    -.6330304    -.140313
          yr2 |  -.5355483   .1226364    -4.37
0.000    -.7759113   -.2951853
        hcard |   .1641242   .1157894     1.42   0.156    -.0628188
3910672
      agecont |   .3145927   .6561289     0.48   0.632    -.9713963
1.600582
     agecont2 |  -.0019006   .0045216    -0.42   0.674    -.0107627
0069614
          sex |  -.0199701   .0940797    -0.21   0.832    -.2043629
1644227
            y |   -.006733   .0834051    -0.08   0.936     -.170204
156738
           y2 |   .0011065   .0067524     0.16   0.870    -.0121279
014341
           ms |  -.0182507   .1053028    -0.17   0.862    -.2246403
1881389
        hchbp |   1.344269   .1090522    12.33   0.000      1.13053
1.558007
       hcchol |    .749958   .0989466     7.58   0.000     .5560263
9438898
     diabcond |   .6907447   .1526588     4.52   0.000      .391539
9899504
     asthcond |   1.129922   .1577985     7.16   0.000     .8206428
1.439201
         sah2 |    .222886   .1714293     1.30   0.194    -.1131092
5588813
         sah3 |   .3962243   .1653541     2.40   0.017     .0721362
7203125
         sah4 |   .7484651   .1680427     4.45   0.000     .4191075
1.077823
         sah5 |   1.140498    .269097     4.24   0.000     .6130776
1.667918
        _cons |  -14.15646   23.73327    -0.60   0.551     -60.6728
32.35989
----------------------------------------------------------------------------
--

  poisson pbs01 yr1 yr2 hcard agecont agecont2 sex y y2 ms hchbp hcchol
diabcond asthcond
> sah2 sah3 sah4 sah5 [pweight=weight2] if group == 1, cluster(randomid2)

Iteration 0:   log pseudolikelihood = -420.43515
Iteration 1:   log pseudolikelihood = -419.99682
Iteration 2:   log pseudolikelihood = -419.99619
Iteration 3:   log pseudolikelihood = -419.99619

Poisson regression                                Number of obs   =
792
                                                   Wald chi2(17)   =
512.26
Log pseudolikelihood = -419.99619                 Prob > chi2     =
0.0000

                             (Std. Err. adjusted for 715 clusters in
randomid2)
----------------------------------------------------------------------------
--
              |               Robust
        pbs01 |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
          yr1 |  -.2793343   .1097001    -2.55
0.011    -.4943426   -.0643259
          yr2 |  -.4742559   .1160211    -4.09
0.000     -.701653   -.2468588
        hcard |   .1508732   .1140992     1.32   0.186    -.0727571
3745034
      agecont |   .2116157   .5903103     0.36   0.720    -.9453713
1.368603
     agecont2 |  -.0012235   .0040616    -0.30   0.763    -.0091842
0067371
          sex |  -.0313402   .0898996    -0.35   0.727    -.2075402
1448598
            y |   .0442089   .0684746     0.65   0.519    -.0899989
1784166
           y2 |  -.0028066   .0056017    -0.50   0.616    -.0137858
0081726
           ms |  -.0114684   .0921717    -0.12   0.901    -.1921217
1691849
        hchbp |    1.10793   .1076391    10.29   0.000     .8969617
1.318899
       hcchol |   .5759237   .0943921     6.10   0.000     .3909184
7609289
     diabcond |   .5187948   .1149089     4.51   0.000     .2935775
7440121
     asthcond |   .8382751   .1282901     6.53   0.000     .5868311
1.089719
         sah2 |   .2328442   .1673569     1.39   0.164    -.0951693
5608578
         sah3 |   .3755066   .1602558     2.34   0.019     .0614111
6896021
         sah4 |   .6245785   .1723873     3.62   0.000     .2867056
9624514
         sah5 |   .8187356   .2241965     3.65   0.000     .3793186
1.258153
        _cons |  -10.15561   21.43606    -0.47   0.636    -52.16951
31.8583
----------------------------------------------------------------------------
--





Peter Siminski
PhD Student
School of Economics / Social Policy Research Centre (SPRC)
University of New South Wales
Ph: 0425223257
[email protected]


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index