dBetaBinom_MP.Rd
dBetaBinom_MP
calculates the beta-binomial density while
avoiding numerical mistakes (catastrophic cancellations) due to
extreme parameter values. This function is called by dBetaBinom
if necessary, and should not be called outside of this.
dBetaBinom_MP(ms, ns, piX, thetaX, LOG, NecPres)
Numeric vector. Vector of number of successes
Numeric vector. Vector of number of trials
Number. Probability of success; 0 >= piX >= 1
Number. Dispersion parameter; 0 >= thetaX > +Inf
Logical. if TRUE, return log-densities
Number. Necessary Precision, i.e. number of bits, for an accurate density calculatation, as determined by the function dBetaBinom
A numeric vector of the same length as ms and ns, containing (log-)beta-binomial densities