--- 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/