multi.corr {CorrBin} | R Documentation |
Calculates the within- and between-outcome correlation coefficients for exchangeable correlated
multinomial data based on joint probability estimates calculated by the jointprobs
function. These determine the variance inflation due the cluster structure.
multi.corr(jp, type = attr(jp, "type"))
jp |
the output of |
type |
one of c("averaged","cluster","mc") - the type of joint probability. By default,
the |
If R_i
and R_j
is the number of events of type i
and j
, respectively, in a cluster of
size n
, then
Var(R_i)= n p_i (1-p_i)(1 + (n-1)\phi_{ii})
Cov(R_i,R_j)= -n p_i p_j (1 + (n-1)\phi_{ij})
where p_i
and p_j
are the marginal event probabilities and \phi_{ij}
are the correlation
coefficients computed by multi.corr
.
a list of estimated correlation matrices by treatment group. If cluster-size specific
estimates were requested ((type="cluster")
), then each list elements are a list of
these matrices for each cluster size.
jointprobs
for calculating the joint probability arrays
data(dehp)
tau <- jointprobs(dehp, type="averaged")
multi.corr(tau)