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]

st: RE: xtmelogit


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

Thank you for getting back. This is a large merged household level dataset with over 650,000 observations over 38 countries. There two levels only - household level and contextual (country) level. 

Thank you for the valuable feedback. I think I will give Stata another go...

Regards,
S.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: 14 November 2012 09:51
To: [email protected]
Subject: st: xtmelogit

------------------------------

Date: Tue, 13 Nov 2012 19:44:55 -0500
From: "JVerkuilen (Gmail)" <[email protected]>
Subject: Re: st: xtmelogit

On Tue, Nov 13, 2012 at 4:22 PM, Szabo S.M. <[email protected]>
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.

Sounds like you're trying to fit a very complex model, which will take a long time due to the fact that adaptive quadrature is being used by
- -xtmelogit-. You may want to switch to the Laplace approximation to see if that speeds things up and then use adaptive quadrature only on the final model.

------------------------------

I second J's comments. Getting good starting values via Laplace approximation is likely a good way to go. I would add that estimation times will also depend on sample size and the nature of the multi-level structure (about which you don't give us details).

Advice commonly given on this list is to start with a less complex model and then make it more complicated. Be aware that models of the sort that you wish to estimate are intrinsically tricky to fit.

MLwiN (http://www.bristol.ac.uk/cmm/software/mlwin/) is very useful software in many respects. (It's also free to UK-based academics; not too costly for others.) In particular, it is relatively fast -- after all, it's a specialised tool for this sort of model whereas Stata is more general software. Be aware though that the estimation algorithms that MLwiN uses to fit -xtmelogit- type models differ from those used by Stata, and so estimates may differ especially for random effects parameters. Stata uses adaptive quadrature; MLwiN offers marginal and penalised quasi-likelihood options (and MCMC). This can matter. In some Monte-Carlo work currently in progress, I find that for a 2-level set-up (large N of individuals nested within C countries), -xtmelogit- does a distinctly better job at fitting the random effects parameters than does MLwiN with method PQL2 (smaller bias, better coverage) particularly in the 'small C' case. Both do well regarding the 'fixed' parameters. MLwiN e!
 stimation time is a fraction of Stata's, however.

If you do consider MLwiN, then I strongly recommend using -runmlwin- (on
SSC) to call MLwiN from within Stata. -runmlwin- is a wonderful front-end, and produces post-estimation results in a way that Stata users have come to expect. (MLwiN isn't that good on those sorts of things, in my opinion.)

You might consider using MLwiN to get starting values and then use them in -xtmelogit- in Stata. (NB "Stata", not "STATA")

Stephen
-------------------------------------
Stephen P. Jenkins  <[email protected]> Professor of Economic and Social Policy Department of Social Policy London School of Economics and Political Science Houghton Street, London WC2A 2AE, U.K.
Tel. +44 (0)20 7955 6527
Changing Fortunes: Income Mobility and Poverty Dynamics in Britain, OUP 2011, http://ukcatalogue.oup.com/product/9780199226436.do
Survival Analysis using Stata:
http://www.iser.essex.ac.uk/survival-analysis
Downloadable papers and software: http://ideas.repec.org/e/pje7.html

Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer

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