Learn R Programming

CorrBin (version 1.3)

mc.est: Distribution of the number of responses assuming marginal compatibility.

Description

The mc.est function estimates the distribution of the number of responses in a cluster under the assumption of marginal compatibility: information from all cluster sizes is pooled. The estimation is performed independently for each treatment group.

Usage

mc.est(cbdata)

Arguments

cbdata
a CBData object

Value

  • A data frame giving the estimated pdf for each treatment and clustersize. It has the following columns:
  • Probnumeric, the probability of NResp responses in a cluster of size ClusterSize in group Trt
  • . The probabilities add up to 1 for each Trt/ClusterSize combination.
  • Trtfactor, the treatment group
  • ClusterSizenumeric, the cluster size
  • NRespnumeric, the number of responses

Details

The EM algorithm given by Stefanescu and Turnbull (2003) is used.

References

Stefanescu, C. & Turnbull, B. W. (2003) Likelihood inference for exchangeable binary data with varying cluster sizes. Biometrics, 59, 18-24

Examples

Run this code
data(shelltox)
sh.mc <- mc.est(shelltox)

library(lattice)
xyplot(Prob~NResp|factor(ClusterSize), groups=Trt, data=sh.mc, subset=ClusterSize>0, 
    type="l", as.table=TRUE, auto.key=list(columns=4, lines=TRUE, points=FALSE),
    xlab="Number of responses", ylab="Probability P(R=r|N=n)")

Run the code above in your browser using DataLab