
Last chance! 50% off unlimited learning
Sale ends in
Computes the Kish design effect and corresponding intra-cluster correlation for a single cluster-sampled variable
deff(y, cluster)
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).
variable to analyze
a variable whose unique values indicate cluster membership. Any type of variable is allowed.
Frank Harrell
Department of Biostatistics
Vanderbilt University
fh@fharrell.com
bootcov
, robcov
set.seed(1)
blood.pressure <- rnorm(1000, 120, 15)
clinic <- sample(letters, 1000, replace=TRUE)
deff(blood.pressure, clinic)
Run the code above in your browser using DataLab