r: r

Description Usage Arguments Details Value Author(s) Examples

Description

r calculates the probability mass function for the Poisson distribution.

Usage

1
r(x, lamb, log = FALSE)

Arguments

x

vector of non-negative counts

lamb

vector of non-negative means for Poisson distribution

log

logical; if TRUE, returns log of probability of x. If FALSE, returns the probabilities of x

Details

r implements Catherine Loader's algorithm for Poisson probabilities (pmf) https://lists.gnu.org/archive/html/octave-maintainers/2011-09/pdfK0uKOST642.pdf

Value

r returns the (log) probability of the observed count x given lamb

Author(s)

Cynthia K. Zajac (^_-)

Examples

1
2
3
4
r(6,15)

# log probability
r(1234568,1234567,T)

cynzajac/CZPoisson documentation built on Nov. 27, 2019, 3:22 a.m.