Compute common probabilities of binary random variates generated by thresholding normal variates at 0.

1 | ```
simul.commonprob(margprob, corr=0, method="integrate", n1=10^5, n2=10)
``` |

`margprob` |
vector of marginal probabilities. |

`corr` |
vector of correlation values for normal distribution. |

`method` |
either |

`n1` |
number of normal variates if method is |

`n2` |
number of repetitions if method is |

The output of this function is used by `rmvbin`

. For all
combinations of `marginprob[i]`

, `marginprob[j]`

and
`corr[k]`

, the probability that both components of a normal
random variable with mean `qnorm(marginprob[c(i,j)])`

and
correlation `corr[k]`

are larger than zero is computed.

The probabilities are either computed by numerical integration of the multivariate normal density, or by Monte Carlo simulation.

For normal usage of `rmvbin`

it is not necessary to use
this function, one simulation result is provided as variable
`SimulVals`

in this package and loaded by default.

`simul.commonprob`

returns an array of dimension
`c(length(margprob), length(margprob), length(corr))`

.

Friedrich Leisch

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, http://www.wu-wien.ac.at/am

1 2 3 | ```
simul.commonprob(seq(0,1,0.5), seq(-1,1,0.5), meth="mo", n1=10^4)
data(SimulVals)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

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.