Statalist


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

Re: st: RE: Shrinkage factor


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: RE: Shrinkage factor
Date   Thu, 15 Oct 2009 09:20:02 +0000 (GMT)

--- On Thu, 15/10/09, Evans Jadotte wrote:
> In fact, this is the formula I have. My problem is the
> malleability of n_j. Since I have 496 clusters at level-2
> with many unbalanced observations within each cluster, the
> manual calculation can make one go crazy!

Getting those number of cases in unbalanced pannels is 
relatively easy when using -bys-:

gen miss = missing(var1, var2, var3)
bys miss id1 id2 id3: gen long nj = _N if miss == 0

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------




Send instant messages to your online friends http://uk.messenger.yahoo.com 

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index