[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Reproducing xtlogit with xtmelogit

From (Roberto G. Gutierrez, StataCorp)
Subject   Re: st: Reproducing xtlogit with xtmelogit
Date   Tue, 11 Aug 2009 11:02:55 -0500

Continuing the thread, Thomas Klausch <> points out
slight differences between -xtlogit- and -xtmelogit- on equivalent models, 
even when both commands converge to a result:

> Anyways, your guess may be right, because I just included a covariate and
> then -xtmelogit- estimates the model without error. However, the models
> estimated by -xtlogit- and -xtmelogit- still are not equivalent. That is the
> log likelihood in my example is

> xtlogit: approx 15016
> xtmelogit: approx 15009

> and also coefficients deviate by some hundredth...

> Do you know why this is? I thought both programs use conditional ML and
> Gauss-Hermit quadrature optimization. Or is there any difference?

Both commands use adaptive Gauss-Hermite quadrature to approximate the
log likelihood.  However, they differ in the default way in which they adapt
the quadrature.  By default, -xtlogit- adapts according to posterior means and
variances, whereas -xtmelogit- adapts according to posterior modes and
curvatures.  In most cases, the resulting difference is slight and akin to
what Thomas is observing.

-xtmelogit-'s method of adapting quadrature is the only one available to that
command because it most easily generalizes to multiple levels of nested
effects.  -xtlogit-, however, supports three quadrature methods:

  1. Adaptive with means and variances, option -intmethod(mvaghermite)-, the 

  2. Adaptive with modes and curvatures, option -intmethod(aghermite)-.  Use
     this option to most closely duplicate results from -xtmelogit-.

  3. Non-adaptive quadrature, option -intmethod(ghermite)-.  Use this option 
     only as a reference; it is not as accurate as the others.

My guess is that if Thomas uses -xtlogit ..., intmethod(aghermite)-, his
results will fall closer in line to those from -xtmelogit-.  Even then, he may
still see some slight differences, mostly due to differences in how each
command takes derivatives of the log-likelihood.  -xtlogit- does this
analytically; -xtmelogit- does this numerically, again to better generalize to
multiple levels of nested effects.

*   For searches and help try:

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