Statalist


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

st: gllamm vs xtlogit results


From   "Anderson, Bradley J" <[email protected]>
To   <[email protected]>
Subject   st: gllamm vs xtlogit results
Date   Mon, 4 Feb 2008 13:28:54 -0500

I'll start by pleading ignorant but I estimated what I think is the same random intercepts logistic regression model using gllamm and xtlogit (Stata version 9.0).  There are 245 groups observed a total of 21,449 times. The number of observations per group ranged from 33 to 90.

Here are the model commands:

. gllamm sexday adrk age white cocfreq alsf06 sexwork if modaci==0, i(sid) link(logit) family(binomial) eform
. xtlogit sexday adrk age white cocfreq alsf06 sexwork if modaci==0, i(sid) or

Here are the results using gllamm:

Iteration 0:   log likelihood = -10681.222  
Iteration 1:   log likelihood = -10074.592  (not concave)
Iteration 2:   log likelihood = -10023.062  (not concave)
Iteration 3:   log likelihood = -10014.547  (not concave)
Iteration 4:   log likelihood = -10011.598  (not concave)
Iteration 5:   log likelihood = -10005.217  (not concave)
Iteration 6:   log likelihood = -9999.7371  (not concave)
Iteration 7:   log likelihood = -9987.7724  
Iteration 8:   log likelihood = -9983.0233  
Iteration 9:   log likelihood = -9981.5635  (not concave)
Iteration 10:  log likelihood =  -9980.723  
Iteration 11:  log likelihood = -9980.2568  
Iteration 12:  log likelihood = -9979.7958  
Iteration 13:  log likelihood = -9979.7931  
Iteration 14:  log likelihood = -9979.7931  
 
number of level 1 units = 21449
number of level 2 units = 245
 
Condition Number = 296.90711
 
gllamm model
 
log likelihood = -9979.7931
 
------------------------------------------------------------------------------
      sexday |     exp(b)   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        adrk |   2.990258   .1311356    24.98   0.000     2.743973    3.258648
         age |   .9625479   .0032265   -11.39   0.000     .9562447    .9688926
       white |    2.32077   .1349106    14.48   0.000     2.070858    2.600842
     cocfreq |   .9992229   .0007336    -1.06   0.290     .9977861    1.000662
      alsf06 |   1.633245   .1010145     7.93   0.000      1.44679     1.84373
     sexwork |   1.726328   .1194638     7.89   0.000     1.507367    1.977094
------------------------------------------------------------------------------
 
 
Variances and covariances of random effects
------------------------------------------------------------------------------

 
***level 2 (sid)
 
    var(1): 1.8187606 (.08452159)
------------------------------------------------------------------------------

And here are the results using xtlogit:

Fitting comparison model:

Iteration 0:   log likelihood = -14686.518
Iteration 1:   log likelihood = -14140.695
Iteration 2:   log likelihood = -14139.752
Iteration 3:   log likelihood = -14139.752

Fitting full model:

tau =  0.0     log likelihood = -14139.752
tau =  0.1     log likelihood = -11318.224
tau =  0.2     log likelihood = -10661.993
tau =  0.3     log likelihood =  -10353.26
tau =  0.4     log likelihood = -10174.441
tau =  0.5     log likelihood = -10071.213
tau =  0.6     log likelihood = -10018.463
tau =  0.7     log likelihood = -10007.504
tau =  0.8     log likelihood = -10129.464

Iteration 0:   log likelihood = -9928.7925  
Iteration 1:   log likelihood =  -9861.779  
Iteration 2:   log likelihood = -9861.1508  
Iteration 3:   log likelihood = -9861.1499  

Random-effects logistic regression              Number of obs      =     21449
Group variable (i): sid                         Number of groups   =       245

Random effects u_i ~ Gaussian                   Obs per group: min =        33
                                                               avg =      87.5
                                                               max =        90

                                                Wald chi2(6)       =    568.07
Log likelihood  = -9861.1499                    Prob > chi2        =    0.0000

------------------------------------------------------------------------------
      sexday |         OR   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        adrk |   3.010925   .1407738    23.58   0.000     2.747278    3.299874
         age |   .9678424   .0152986    -2.07   0.039     .9383174    .9982965
       white |   1.111466   .3423468     0.34   0.732     .6077351    2.032721
     cocfreq |   1.002477   .0040672     0.61   0.542     .9945366     1.01048
      alsf06 |   1.369673   .4218245     1.02   0.307     .7489773    2.504756
     sexwork |   1.648899   .5901059     1.40   0.162      .817649    3.325225
-------------+----------------------------------------------------------------
    /lnsig2u |   1.509917   .1031085                      1.307828    1.712006
-------------+----------------------------------------------------------------
     sigma_u |   2.127523   .1096829                      1.923053    2.353734
         rho |   .5790974    .025132                      .5292118    .6274186
------------------------------------------------------------------------------
Likelihood-ratio test of rho=0: chibar2(01) =  8557.20 Prob >= chibar2 = 0.000

The magnitude of the estimated effects of adrk and age are similar though the standard error estimated for the age effect is much smaller when estimated by gllamm.  The estimated coefficient for white is 2.32 when using gllamm but only 1.11 when estimated using xtlogit.  Other coefficients are of relatively similar magnitude but standard errors and substantive conclusions would be quite different between the two models.

Are these estimating the same model?  And if so, why would some estimated coefficients and standard errors be so different?  And finally, how do I figure out what results to trust?  As an asside, I estimated the population averaged effects using both xtgee and logistic with standard errors adjusted for clustering.  Substantive conclusions were similar to xtlogit.

Thanks,

*
*   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