multi.corr: Extract correlation coefficients from joint probability...

Description Usage Arguments Details Value See Also Examples

View source: R/ExchMultinomial.R

Description

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.

Usage

1
multi.corr(jp, type = attr(jp, "type"))

Arguments

jp

the output of jointprobs - a list of joint probability arrays by treatment

type

one of c("averaged","cluster","mc") - the type of joint probability. By default, the type attribute of jp is used.

Details

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)φ_{ii})

Cov(R_i,R_j)= -n p_i p_j (1 + (n-1)φ_{ij})

where p_i and p_j are the marginal event probabilities and φ_{ij} are the correlation coefficients computed by multi.corr.

Value

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.

See Also

jointprobs for calculating the joint probability arrays

Examples

1
2
3
data(dehp)
tau <- jointprobs(dehp, type="averaged")
multi.corr(tau)

CorrBin documentation built on May 2, 2019, 4:46 p.m.