check.commonprob | R Documentation |

The main diagonal elements `commonprob[i,i]`

are interpreted as
probabilities `p_{A_i}`

that a binary variable `A_i`

equals 1. The
off-diagonal elements `commonprob[i,j]`

are the probabilities
`p_{A_iA_j}`

that both `A_i`

and `A_j`

are 1.

This programs checks some necessary conditions on these probabilities
which must be fulfilled in order that a joint distribution of the
`A_i`

with the given probabilities can exist.

The conditions checked are

`0 \leq p_{A_i} \leq 1`

```
\max(0, p_{A_i} + p_{A_j} - 1) \leq p_{A_iA_j} \leq
\min(p_{A_i}, p_{A_j}), i \neq j
```

```
p_{A_i} + p_{A_j} + p_{A_k} - p_{A_iA_j} -p_{A_iA_k} - p_{A_jA_k}
\leq 1, i \neq j, i \neq k, j \neq k
```

```
check.commonprob(commonprob)
```

`commonprob` |
Matrix of pairwise probabilities. |

`check.commonprob`

returns `TRUE`

, if all conditions are
fulfilled. The attribute `"message"`

of the return value contains
some information on the errors that were found.

Andreas Weingessel

Friedrich Leisch, Andreas Weingessel and Kurt Hornik (1998). On the generation of correlated artificial binary data. Working Paper Series, SFB “Adaptive Information Systems and Modelling in Economics and Management Science”, Vienna University of Economics.

`simul.commonprob`

,
`commonprob2sigma`

```
check.commonprob(cbind(c(0.5, 0.4), c(0.4, 0.8)))
check.commonprob(cbind(c(0.5, 0.25), c(0.25, 0.8)))
check.commonprob(cbind(c(0.5, 0, 0), c(0, 0.5, 0), c(0, 0, 0.5)))
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.