[Rd] bug in "R Help on 'rmultinom()'" (PR#14222)

somorcik at fmph.uniba.sk somorcik at fmph.uniba.sk
Wed Feb 24 15:10:08 CET 2010

Full_Name: Jan Somorcik
Submission from: (NULL) (

The explanation of "rmultinom()" in R Help contains an obvious bug. The original

"The 'rmultinom()' algorithm draws binomials from Bin(n[j], P[j]) sequentially,
where n[1] = N (N := 'size'), P[1] = p[1] (p is 'prob' scaled to sum 1), and for
j >= 2, recursively n[j]= N - sum(k=1, .., j-1) n[k] and P[j]= p[j] / (1 -

should be corrected, e.g. as follows:

"...draws binomials X[j] from.............., recursively n[j]= N - sum(k=1, ..,
j-1) X[k]"

More information about the R-devel mailing list