Computes the Kish design effect and corresponding intra-cluster correlation
for a single cluster-sampled variable
Usage
deff(y, cluster)
Value
a vector with named elements n (total number of non-missing
observations), clusters (number of clusters after deleting
missing data), rho(intra-cluster correlation), and deff
(design effect).
Arguments
y
variable to analyze
cluster
a variable whose unique values indicate cluster membership. Any
type of variable is allowed.
Author
Frank Harrell
Department of Biostatistics
Vanderbilt University
fh@fharrell.com