Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wed, 14 Nov 2012 09:51:03 -0000
Date: Tue, 13 Nov 2012 19:44:55 -0500
From: "JVerkuilen (Gmail)" <firstname.lastname@example.org>
Subject: Re: st: xtmelogit
On Tue, Nov 13, 2012 at 4:22 PM, Szabo S.M. <S.M.Szabo@soton.ac.uk>
> 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
estimation 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 P. Jenkins <email@example.com>
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
Survival Analysis using Stata:
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: