rcategor.int {simcausal} | R Documentation |
Random Sample from Base 1 (rcat.b1) or Base 0 (rcat.b0) Categorical (Integer) Distribution
Description
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.
Usage
rcategor.int(n, probs)
rcat.b1(n, probs)
rcat.b0(n, probs)
Arguments
n |
Sample size. |
probs |
Either a vector or a matrix of success probabilities.
When probs is a vector, |
Value
An integer vector of length n
with range either in 0,...,ncol(probs)
or in 1,...,ncol(probs)+1
.
Functions
-
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