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

st: RE: Reproducing xtlogit with xtmelogit

From   "Martin Weiss" <>
To   <>
Subject   st: RE: Reproducing xtlogit with xtmelogit
Date   Mon, 10 Aug 2009 19:44:45 +0200


The equivalance should be obvious from this:

webuse bangladesh, clear

// Random-intercept model,
// analogous to xtlogit
xtmelogit c_use urban age /*
*/child* || district:, nolog

xtlogit c_use urban /*
*/age child*, i(district)/*
*/ nolog


-----Original Message-----
[] On Behalf Of Thomas Klausch
Sent: Montag, 10. August 2009 18:56
Subject: st: Reproducing xtlogit with xtmelogit

Hello stata list member,

As I understand it should be possible to reproduce a random effects
logistic regression model that was fitted with xtlogit by using the
multilevel syntax of xtmelogit. But for my case it just does not seem
to work.

I have longitudinal data, i.e. respondents nested in days. First step
is that I want to fit an empty random intercept model, that is:

xtset respondents days
xtlogit dummy, re

Which gives me a fit using Gauss-Hermite Quadrature in reasonable
time, say 3 minutes for NxT=60,000.

Then giving

xtmelogit dummy || respondents:

Does give no fit. I was not sure what would be the correct syntax, maybe it

xtmelogit dummy || respondents: ||days:

This takes forever to fit (I am not sure if the algorithm is ever
going to stop, It's still running after 1h waiting).

a. Am I specifying xtmelogit correctly?
b. Does xtmelogit use the same optimization algorithm as xtlogit?
c. What should be changed to yield the same results as with xtlogit?

Many thanks in advance.

Kind regards

*   For searches and help try:

*   For searches and help try:

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