[Rd] rmultinom.c error probability not sum to 1
pdalgd at gmail.com
Thu Mar 10 13:26:09 CET 2016
On 10 Mar 2016, at 12:47 , M.van_Iterson at lumc.nl wrote:
> Dear all,
> I have a questions regarding using the c function rmultinom.c.
> I got the following error message "rbinom: probability sum should be 1, but is 0.999264"
> Which is thrown by:
> if(fabs((double)(p_tot - 1.)) > 1e-7)
> MATHLIB_ERROR(_("rbinom: probability sum should be 1, but is %g"),
> (double) p_tot);
> I understand my probabilities do not sum to one close enough. I tried the following,
> p = 1. - p - p, where 'p', are the probabilities but this is not sufficient to pass the error message!
> Thanks in advance!
> (I don't think this is an issue with versions but I used R version 3.2.3 and can provide more details on my linux build if necessary.)
> [[alternative HTML version deleted]]
> R-devel at r-project.org mailing list
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Office: A 4.23
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-devel