Bookmark and Share

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

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

Re: st: RE: save iterations of xtmelogit - need to break/pause

From   "JVerkuilen (Gmail)" <>
Subject   Re: st: RE: save iterations of xtmelogit - need to break/pause
Date   Thu, 9 May 2013 08:17:45 -0400

On Thu, May 9, 2013 at 1:11 AM, tshmak <> wrote:
> Hi Ann,
> Despite your 160,000 individuals, I am rather unsure you have enough data
> to fit a model with 4 random effects, if that's what you mean by 4 levels.
> Since it's a logistic regression, perhaps a better measure of how much data
> you have is the smaller of the number of 1's and 0's. There's probably huge
> uncertainty over the variance of the random effects, and Stata is having a
> hard time converging.

100% agree. Everyone always says "I have X thousands of data
points!?!?!?" but in a multilevel model the Ns at each level matter.
With logistic it's even worse, just as Tim noted, because it's
essentially the minimal number of events or non-events that matter.
These can become quite small.

> My suggestion is:
> 1. Try and fit a simpler model. Perhaps some of the random effects have
> only a handful number of different values. Perhaps consider treating them as
> fixed-effects?

Yes, start with the random intercept model and build upwards towards
the model you want.

> 2. Consider doing it in WinBUGS/OpenBUGS. If you use informative priors,
> you can pretty much fit anything. You can also use it to tell you whether
> your model should be fit in Stata. If using different uninformative priors
> gives you very different results, you probably shouldn't use Stata for your
> model, and your best bet is either simplify it or use a subjective Bayesian
> approach.

Agreed, but that's no light undertaking. I suspect the amount of
effort it would take would be substantial. An alternative would be to
look at MCMCglmm in R, which is a nice program but has some quirks in
the interface.

JVVerkuilen, PhD

"They were careless people, Tom and Daisy - they smashed up things and
creatures and then retreated back into their money of their vast
carelessness, or whatever it was that kept them together, and let other
people clean up the mess they had made." -- F. Scott Fitzgerald
*   For searches and help try:

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