Description Usage Arguments Details Value Author(s) References See Also Examples

Generates correrlated binary cluster data given value of Intracluster Correlation, proportion of event, perceent of variation in event proportion, number of clusters, cluster size and percent of variation in cluster size

1 | ```
rcbin(prop = 0.5, prvar = 0, noc, csize, csvar = 0, rho)
``` |

`prop` |
A numeric value between 0 and 1 denoting assumed proportion of event in interest, default value is 0.5. See Detail |

`prvar` |
A numeric value between 0 and 1 denoting percent of variation in assumed proportion of event ( |

`noc` |
A numeric value telling the number of clusters to be generated |

`csize` |
A numeric value denoting desired cluster size. See Deatil |

`csvar` |
A numeric value between 0 and 1 denoting percent of variation in cluster sizes ( |

`rho` |
A numeric value between 0 and 1 denoting desired level of Intracluster Correlation |

The minimum and maximum values of event proportion (`prop`

) will be taken as 0 and 1 respectively in cases where it exceeds the valid limits (0, 1) due to larger value of percent variation (`prvar`

) supplied

The minimum value of cluster size (`csize`

) will be taken as 2 in cases where it goes below 2 due to larger value of percent variation (`csvar`

) supplied

A dataframe with two columns presenting cluster id (`cid`

) and a binary response (`y`

) variables

Akhtar Hossain [email protected]

Hrishikesh Chakraborty [email protected]

Lunn, A.D. and Davies, S.J., 1998. A note on generating correlated binary variables. Biometrika, 85(2), pp.487-490.

1 | ```
rcbin(prop = .4, prvar = .2, noc = 30, csize = 20, csvar = .2, rho = .2)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.