[R] Hmisc package: deff() command's formula for the design effect

jjh21 jjharden at gmail.com
Thu May 28 20:24:09 CEST 2009

One additional question:

It seems that in practice the design effect is often calculated on the
response variable or on individual predictor variables. I have some OLS
models using observational data that are clustered. Does it make sense to
calculate the design effect on the residuals of one of these models to see
the extent to which there is still clustering left even after including

Thomas Lumley wrote:
> The formula in Hmisc is correct (if the correlation doesn't vary with the 
> cluster size).  If you think of the formula for the variance of a sum, it 
> involves adding up all the variances and covariances.  A cluster of size k 
> has k^2-k covariances between members, so the total number of covariances 
> is sum(k^2-k) over all the clusters, plus the sum(k) variances.
> Another way to think of it is that the larger clusters get too much 
> weight, so in addition to the rho*(B-1) factor that you would have for 
> equal-sized clusters there is an additional loss of efficiency due to 
> giving too much weight to the larger clusters.
>  	-thomas
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

View this message in context: http://www.nabble.com/Hmisc-package%3A-deff%28%29-command%27s-formula-for-the-design-effect-tp23415477p23767287.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list