RMultinom: Simulate random number from the multinomial distribution.

Description Usage Arguments Value

Description

Generate random integers from the binomial distribution when possible within integer overflow constraints. Otherwise, approximate with the normal distribution.

Usage

1
RMultinom(n, size, prob)

Arguments

n

the number of random vectors to draw

size

integer, say N, specifying the total number of objects that are put into K boxes in the typical multinomial experiment.

prob

numeric non-negative vector of length K, specifying the probability for the K classes; is internally normalized to sum 1. Infinite and missing values are not allowed.

Value

Matrix of random numbers from the multinomial distribution, or its normal approximation. The function will return a numeric value, rather than an integer.


google/amss documentation built on May 20, 2019, 5:05 p.m.