DesignLibrary icon indicating copy to clipboard operation
DesignLibrary copied to clipboard

ICC

Open macartan opened this issue 6 years ago • 1 comments

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

macartan avatar Aug 16 '18 10:08 macartan

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?

clarabicalho avatar Aug 16 '18 12:08 clarabicalho