Statalist The Stata Listserver


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

Re: st: xtlogit vs gllamm


From   "Stas Kolenikov" <[email protected]>
To   [email protected]
Subject   Re: st: xtlogit vs gllamm
Date   Tue, 16 May 2006 10:26:07 -0500

The condition number is terrific, I would die to have conditions
numbers like that in my runs of gllamm (which tend to produce
condition numbers like 1e3). There is yet another reason why the
results may be different: the identified quantity in this model is
beta/s.e. of the total residual variance; depending on
parameterization of the variance, you may get different answers.

What is troubling for me in the above output is that the likelihoods
are different; it might be that the two routines found different local
maxima. Try starting each from the same point, or from the point
achieved by the other, and see where they will go.

On 5/16/06, Bryan W. Griffin <[email protected]> wrote:
There are three reasons results from xtlogit and gllamm do not agree
here for you.

First, your data apparently have a large random effect variance which
creates problems, often, with random effect estimation for logistic
regression. Or it may be simply that you have spare data (e.g.,
little information, small sample size, or few 0 or 1's for the
outcome). The condition code from gllamm you include suggest and the
large differences in parameter estimates suggest something odd with
your data.  Most likey the issue is the large random effect -- note
rho is about .78 (that is very large for logistic regression).

Second, xtlogit and gllamm use different implementations of adaptive
quadrature. I have run simulations on this and reported to Stata that
xtlogit's adaptive quadrature provides large biased estimates when
large random effects are present and that gllamm estimates and
estimates using adaptive quadrature from SAS are more accurate (and
agree with each other). I hope that with a future update the
implementation in xtlogit changes to agree more with gllamm and SAS.
Note, however, that xtlogit with non-adaptive quadrature works very
well, so try estimating your model with that approach.

Third, despite belief among some that only a few integration points
are needed, when large variances are present in random effects, many
integration points are required. You used only 12; up the number to
150 for gllamm and xtlogit then check estimates. Rerun both with
number of points at 165 or 170 for comparisons to see if number of
points still produces differing results. Run xtlogit with both
adaptive and nonadaptive, and do the same with gllamm and compare results.



>Date: Mon, 15 May 2006 14:49:33 -0400
>From: =?iso-8859-1?Q?B=E9gin_Karine?= <[email protected]>
>Subject: st: xtlogit vs gllamm
>
>Hi,
>
>I have a dichotomous outcome variable taken at various time
>points.  I performed a regression on this variable using both the
>"gllamm" command with a logit link, a binomial distribution and the
>adaptative quadrature (ado file) and the "xtlogit" command (running
>with the same number of adaptative quadrature points as with
>gllamm).  Both commands produce quiet different results and I am
>wondering why since both gllamm and xtlogit seem to be conceived for
>similar purpose.  An example of the results is listed below.
>
>Thanks,
>Karine
>
>
>. gllamm emploi sexe FAC3_, i(no_seque) link(logit) family(binom)
>nip(12) adapt
>Condition Number = 8.8565296
>-
>------------------------------------------------------------------------------
>       emploi |      Coef.   Std. Err.      z    P>|z|     [95%
> Conf. Interval]
>-
>-------------+----------------------------------------------------------------
>         sexe
> |  -2.772054   .3028192    -9.15   0.000    -3.365569    -2.17854
>        FAC3_
> |   1.382007   .1186971    11.64   0.000     1.149365    1.614649
>        _cons
> |  -9.172404   .4245712   -21.60   0.000    -10.00455    -8.34026
>-
>------------------------------------------------------------------------------
>
>Variances and covariances of random effects
>-
>------------------------------------------------------------------------------
>***level 2 (no_seque)
>     var(1): 227.29026 (21.232383)
>-
>------------------------------------------------------------------------------
>
>
>xtlogit
>. xtlogit emploi sexe FAC3_, i(no_seque)
>-
>------------------------------------------------------------------------------
>       emploi |      Coef.   Std. Err.      z    P>|z|     [95%
> Conf. Interval]
>-
>-------------+----------------------------------------------------------------
>         sexe
> |  -.1323433   .1503605    -0.88   0.379    -.4270445    .1623579
>        FAC3_
> |   .2813436    .065331     4.31   0.000     .1532971    .4093901
>        _cons
> |  -2.290372    .085298   -26.85   0.000    -2.457553   -2.123191
>-
>-------------+----------------------------------------------------------------
>     /lnsig2u
> |   2.481279   .0429478                      2.397103    2.565455
>-
>-------------+----------------------------------------------------------------
>      sigma_u
> |   3.457824    .074253                       3.31531    3.606463
>          rho
> |   .7842202   .0072676                      .7696356    .7981235
>-
>------------------------------------------------------------------------------
>Likelihood-ratio test of rho=0: chibar2(01) =  7631.32 Prob >=
>chibar2 = 0.000

___________________________________________________________________
Bryan W. Griffin
Curriculum, Foundations, & Reading
P.O. Box 8144
Georgia Southern University
Statesboro, GA 30460-8144

Phone: 912-681-0488
E-Mail: [email protected]
WWW: http://coe.georgiasouthern.edu/foundations/bwgriffin/

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


--
Stas Kolenikov
http://stas.kolenikov.name

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