DesignLibrary
DesignLibrary copied to clipboard
ICC
Think it worthwhile making ICC an explicit argument of the cluster designers. Currently it is set when all other vars are set.
Think this requires something like, in arguments:
ICC = NULL,
sd_i_0 = ifelse(is.null(ICC),
sqrt(max(0, 1 - sd_block^2 - sd_cluster^2)),
sqrt((sd_block^2 + sd_cluster^2)(1 - ICC)/ICC))
)
This based on:
ICC = (varB + varC)/ (varB + varC + varI) --> varI = (varB + varC)(1 - ICC)/ICC --> sdI = sqrt((sdB^2 + sdC^2)(1 - ICC)/ICC)
Should note that this is ICC before accounting for blocks
Good point. On similar note, cluster_sampling_designer(icc = 0)
currently not allowed. Should we accommodate the DGP to draw from rnorm()
when icc = 0?