Same as , but returning a vector of sampled integers with range 1, 2, ..., ncol(probs)+1 for rcat.b1
or range 0, 1, ..., ncol(probs) for rcat.b0. For sampling categorical factors see rcat.factor.
rcategor.int(n, probs)rcat.b1(n, probs)
rcat.b0(n, probs)
An integer vector of length n with range either in 0,...,ncol(probs) or in 1,...,ncol(probs)+1.
Sample size.
Either a vector or a matrix of success probabilities.
When probs is a vector, n identically distributed random categorical variables are
generated.
When probs is a matrix, the categorical probabilities of the kth
sample are determined by the kth row of probs matrix, i.e., probs[k,].
rcategor.int(): (Deperecated) Random Sample from Base 1 Categorical (Integer) Distribution
rcat.b1(): Random Sample from Base 1 Categorical (Integer) Distribution
rcat.b0(): Random Sample from Base 0 Categorical (Integer) Distribution
rcat.factor