rprobMat | R Documentation |
Generates discrete probability distributions in a matrix.
rprobMat(n, dim, d, alpha = 1) rcondProbMat(n, dim, d, alpha = 1, condition)
n |
number of distributions |
dim |
dimension of contingency table for distributions |
d |
number of dimensions of table |
alpha |
parameter to use in dirichlet distribution |
condition |
which dimensions should be conditioned upon |
Returns an object of class tables
consisting of
discrete probability distributions. Each distribution is assumed to be a
contingency table of dimension dim
, and the probabilities
are generated using a Dirichlet distribution with parameters all
equal to alpha
.
A tables
object containing random distributions.
rcondProbMat
: Random conditional distributions
dat <- rprobMat(10, c(2,2,2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.