rcbin: Generates correlated binary cluster data

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

Description

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

Usage

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

Arguments

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 (prvar), default value is 0. See Detail

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 (csize), default value is 0. See Detail

rho

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

Details

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

Value

A dataframe with two columns presenting cluster id (cid) and a binary response (y) variables

Author(s)

Akhtar Hossain [email protected]

Hrishikesh Chakraborty [email protected]

References

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

See Also

rcbin1 iccbin

Examples

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

akhtarh/ICCbin documentation built on May 17, 2019, 12:04 p.m.