unwrap.CBData {CorrBin} | R Documentation |
unwrap.CBData
is a utility function that reformats a CBData object so that
each row is one observation (instead of one or more clusters). A new `ID' variable is added
to indicate clusters. This form can be useful for setting up the data for a different package.
unwrap.CBData(cbdata)
cbdata |
a CBData object |
A data frame with one row for each cluster element (having a binary outcome) with the following standardized column names
Trt |
factor, the treatment group |
ClusterSize |
numeric, the cluster size |
ID |
factor, each level representing a different cluster |
Resp |
numeric with 0/1 values, giving the response of the cluster element |
Aniko Szabo
data(shelltox) ush <- unwrap.CBData(shelltox) head(ush)