R: Simulating a multivariate Bernoulli distribution
RMultBinary
R Documentation
Simulating a multivariate Bernoulli distribution
Description
This function generates a sample from a multinomial distribution of K
dependent binary (Bernoulli) variables
(X_1, X_2, ..., X_K) defined by an array
(of 2^K cells) detailing the joint-probabilities.
A list describing the multivariate binary distribution. It can be generated
by the ObtainMultBinaryDist function.
The list contains at least the element joint.proba, an array
detailing the joint-probabilities of the K
binary variables. The array has K dimensions of size 2, referring to
the 2 possible outcomes of the considered variable. Hence, the total number
of elements is 2^K.
Additionnaly the list can also provides the element var.label, a list
containing the names of the K variables.
target.values
A list describing the possibles outcomes of each binary variable, for
instance {1, 2}. Default = {0, 1}.
Value
A list whose elements are detailed herehunder.
binary.sequences
The generated K x n random sequence.
possible.binary.sequences
The possible binary sequences, i.e. the domain.
chosen.random.index
The index of the random draws in the domain.
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
ObtainMultBinaryDist for estimating the
joint-distribution required by this function.