R: Generating a multivariate Bernoulli joint-distribution
ObtainMultBinaryDist
R Documentation
Generating a multivariate Bernoulli joint-distribution
Description
This function applies the IPFP procedure to obtain a joint distribution of
K multivariate binary (Bernoulli) variables X_1, ..., X_K.
It requires as input the odds ratio or alternatively the correlation as a
measure of association between all the binary variables and a vector of marginal
probabilities.
This function is useful when one wants to simulate and draw from a
multivariate binary distribution when only first order (marginal probabilities)
and second order moments (correlation or odds ratio) are available.
A K x K matrix where the i-th row and the j-th
column represents the Odds ratio between variables i and j. Must
be provided if corr is not.
corr
A K x K matrix where the i-th row and the j-th
column represents the correlation between variables i and j.
Must be provided if odds is not.
marg.probs
A vector with K elements of marginal probabilities where the
i-th entry refers to P(X_i = 1).
...
Additional arguments that can be passed to the Ipfp function such as
tol, iter, print and compute.cov.
Value
A list whose elements are mainly determined by the Ipfp function.
joint.proba
The resulting multivariate joint-probabilities (from Ipfp).
stp.crit
The final value of the Ipfp stopping criterion.
conv
Boolean indicating whether the Ipfp algorithm converged to a
solution.
check.margins
A list returning, for each margin, the absolute maximum deviation between
the desired and generated margin. Ideally the elements should approximate
0 (from Ipfp).
label
The names of the variables.
Note
It is important to note that either the odds ratio defined in odds or
the correlations described in corr must be provided.
Author(s)
Thomas Suesse
Maintainer: Johan Barthelemy <johan@uow.edu.au>.
References
Lee, A.J. (1993).
Generating Random Binary Deviates Having Fixed Marginal Distributions and
Specified Degrees of Association
The American Statistician 47 (3): 209-215.
Qaqish, B. F., Zink, R. C., and Preisser, J. S. (2012).
Orthogonalized residuals for estimation of marginally specified association
parameters in multivariate binary data.
Scandinavian Journal of Statistics 39, 515-527.
See Also
Ipfp for the function used to estimate the
distribution; RMultBinary to simulate the
estimated joint-distribution; Corr2Odds and
Odds2Corr to convert odds ratio to correlation
and conversely.