multi.corr {CorrBin} | R Documentation |

## Extract correlation coefficients from joint probability arrays

### 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

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

### Arguments

`jp` |
the output of |

`type` |
one of c("averaged","cluster","mc") - the type of joint probability. By default,
the |

### 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)\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`

.

### 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

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

*CorrBin*version 1.6.1 Index]