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: SAS vs STATA : why is xtlogit SO slow ?
From
Clyde B Schechter <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: SAS vs STATA : why is xtlogit SO slow ?
Date
Fri, 3 Feb 2012 16:34:40 +0000
I don't really know much about how xtlogit (or any of the other xt estimators) work "under the hood" [that's "under the bonnet" to Nick Cox] but I have used these estimators a fair amount and have some pragmatic tips for dealing with non-convergence of random effects models that have served me well.
1. Check all of your categorical predictors. If any of them have any level that is only instantiated in a small number of cases in the estimation sample, the coefficient for that level can be very difficult to estimate. Try combining some levels in that variable (or, if it is a dichotomous variable drop it from the model.)
2. Similarly check your continuous variables to be sure the have some reasonable amount of variability in the estimation sample.
3. Check the scales of your continuous variables to see that they are all in the same "ballpark." If two variables differ by several orders of magnitude, Stata will often thrash around trying to fit coefficients and ultimately fail.
4. Try providing Stata with starting values of your own using the from() option. Other responders have already suggested this. I have a couple of specific suggestions for selecting starting values:
a. Try the non-xt version of the same model, in this case logit. See if those values will get Stata over the hump.
b. Try the population averaged version of the same model. The population averaged estimator is calcualted using a different approach that seems to be more robust to quirks in the data, and those estimates often work well as starting values for the random effects model. [Which surprises me, because the population averaged parameters are actually different conceptually and often distant numerically from the corresponding parameters of a random effects model. But my experience is that they almost always work as a starting point nonetheless.]
Hope this helps.
Clyde Schechter
Department of Family & Social Medicine
Albert Einstein College of Medicine
Bronx, New York, USA
*
* 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/