CMData function creates an object of class
CMData that is used in further analyses. It
identifies the variables that define treatment group,
clustersize and the number of responses for each outcome
type.CMData(x, trt, nresp, clustersize = NULL, freq = NULL)clustersize is NULL, then
it will be calculated aNULL. If NULL, its
value will be calculated by adding the counts from the
nresp variables. If defined, an additional
response type will be cNULL, then each row is assumed to
correspond to one cluster.read.CMData for creating a CMData
object directly from a file.data(dehp)
dehp <- CMData(dehp, trt="Trt", nresp=c("NResp.1","NResp.2","NResp.3"))
str(dehp)Run the code above in your browser using DataLab