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: tricks to speed up -xtmelogit-


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: tricks to speed up -xtmelogit-
Date   Tue, 21 Dec 2010 14:45:43 -0600

On Tue, Dec 21, 2010 at 2:28 PM, Sergiy Radyakin <[email protected]> wrote:
> Given the rareness of your outcome taking a simple subsample may yield just
> a few positives in the subsample. May I suggest also to consider taking all
> positives and a random subsample of negatives, estimate the candidate and
> then run the full sample on that?

In this case, the estimate of the intercept will be biased (and so
will probably be the estimates of the variance of the random effects),
while the slopes will be OK. You can leave it alone (it will converge
in one or two iterations), or adjust it towards the true proportion of
1's in the sample. Suppose you took 1% sample of 0's and 100% sample
of 1's, so you end up with roughly 0.5%:1% = 1:2 ratio of 0's and 1's.
Then without the regressors, your intercept will be something like
log( odds ratio of 1:2 ) = -0.7, while in reality it should've been
logit( odds ratio of 0.5% to 99.5% ) = -5.3. Thus shifting the
intercept down by 4.6 will take care of most of the bias, at least in
terms of specifying the starting values.

-- 
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.
*
*   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/


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