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

Re: st: RE: Shrinkage factor

From   Maarten buis <>
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 L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen

Send instant messages to your online friends 

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index