Yes exactly that was my plan, estimating the empty model to get an
idea of the variance in event probabilities of individuals.
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?
Thanks,
Thomas
2009/8/11 Martin Weiss <[email protected]>:
>
> <>
>
> I can only speculate, but what you are doing is you are estimating a "naive"
> model, sort of "constant only" - which may entail special problems for the
> initial values. Even in this case, the official examples do coincide in
> their results, though...
>
>
> *************
>
> webuse bangladesh, clear
>
> // Random-intercept model,
> // analogous to xtlogit
> xtmelogit c_use /*
> */|| district:
>
> xtlogit c_use /*
> */, i(district)/*
> */ nolog
>
> *************
>
> Also note http://www.stata.com/meeting/2sweden/gutierrez_sweden07.pdf
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Thomas Klausch
> Gesendet: Dienstag, 11. August 2009 16:51
> An: [email protected]
> Betreff: Re: st: RE: Reproducing xtlogit with xtmelogit
>
> Thanks for the initial guidelines. However, if I apply the same syntax
> to my data set, that is
>
> xtset respnr
> xtlogit dummy
>
> //equivalent xtlogit model should be:
> xtmelogit dummy || respnr:
>
> STATA returns the error code r1400 "initial values not feasible"
> (numerical overflow). However for xtlogit the algorithm finds a
> solution.
>
> So I understand that the algorithms used by the two programs (xtlogit
> and xtmelogit) are not the same. Is there anything I can do about this
> numerical overflow?
>
> Many thanks
>
> Thomas Klausch
>
>
>
> 2009/8/10 Martin Weiss <[email protected]>:
>>
>> <>
>>
>>
>> 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
>> ***
>>
>>
>>
>> HTH
>> Martin
>>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of Thomas Klausch
>> Sent: Montag, 10. August 2009 18:56
>> To: [email protected]
>> 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
>> is
>>
>> 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
>>
>> Thomas
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/statalist/faq
>> * http://www.ats.ucla.edu/stat/stata/
>>
>>
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/statalist/faq
>> * http://www.ats.ucla.edu/stat/stata/
>>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/