Description Usage Arguments Value Examples
(dn) This function simulates a categoric distribution. Similar to the
multinomial distribution but the size parameter is one and it is
considered as a univariate distribution. Values are the numbers of
drawn [lev
] categories. If necessary this function could be
replaced by some C code... Possible conditional distribution are
introduced if !is.null(parents) using their order and unex
convention. See the description provided in the function
help8ltype
for numcat
.
1 |
X |
already generated parents. If no one, must be a matrix nx0 to indicate the number of draws to perform. |
proba |
Matrix [p,k] of the probabilities of the multinomials.
When there are no parents, p=1 because the distribution is the same
for all the draws. When there are parents, it is the product of the
numbers of categories of the parents. By the way, the parents must be
of nature |
lev |
When null a distribution is drawn with values from
|
parents |
When null no parents. If not, the parent names as variables names if any. Be careful that their order is significant for the interpretation of the proba matrix. |
parentslength |
Only when there are parents. Then The vector of lengths of levels of the parents. This cannot be deduced from the simulated values because some of the levels can be missing. |
a vector [n] of the draws is returned (it is a factor).
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.