Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

RE: st: xtmelogit


From   "Szabo S.M." <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: xtmelogit
Date   Wed, 14 Nov 2012 18:36:05 +0000

Very grateful to all. I initially left it to run overnight and it still did not produce the results. But then I reduced the dataset by removing the unnecessary variables and reduced the number of options used. This seemed to help. I did not measure the time now, but  it takes a couple of hours, which seems acceptable. I will implement all recommendations as I go along.

Kind regards,
Sylvia


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jeph Herrin
Sent: 14 November 2012 15:29
To: [email protected]
Subject: Re: st: xtmelogit

You don't say what you mean by "a very long time". I am using
-xtmelogit- for a project now with 1.5million observations in 8000 groups, including some cross-level interactions, and it takes an hour or two for rare outcomes (~2%). For me, this seems reasonable.

One trick you might try is to start with a simpler model (as others have
noted) and use the estimates as starting points for a more complicated model.

  xtmelogit `simple_varlist' || group:
  matrix b=e(b)
  xtmelogit `full_varlist' || group:, ///
		refineopts(iterate(0)) from(b)

tells the second model to use the results of the first model as starting estimates when available.

The other suggestion, mentioned by others, is to use laplace estimation.

Also, if you don't have any cross-level effects and don't care about the estimates of the random effects, you might use -xtlogit-, which generally runs faster (why? I think because it doesn't estimate the random effects for each group).

cheers,
Jeph



On 11/13/2012 4:22 PM, Szabo S.M. wrote:
> Dear STATA Listers,
>
> I wanted to inquire whether anyone else had a problem using xtmelogit command. I am trying to fit a couple of multilevel logistic models and it takes a (very) long time to obtain output (including interactions, random effects, unstructured covariance and odds ratio options).
>
> This has lead me to a frustration and considering switching to MLWin, although I have traditionally used STATA.
>
> Kindly advise.
>
> Regards,
>
> Sylvia
> University of Southampton
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index