From somorcik at fmph.uniba.sk  Wed Feb 24 15:10:08 2010
From: somorcik at fmph.uniba.sk (somorcik at fmph.uniba.sk)
Date: Wed, 24 Feb 2010 15:10:08 +0100 (CET)
Subject: [Rd] bug in "R Help on 'rmultinom()'" (PR#14222)
Message-ID: <20100224141008.E5D8E282EFFB@mail.pubhealth.ku.dk>

Full_Name: Jan Somorcik
Version: 
OS: 
Submission from: (NULL) (158.195.31.33)


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

"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 -
sum(p[1:(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]"



[Rd] bug in "R Help on 'rmultinom()'" (PR#14222)
somorcik at fmph.uniba.sk