Description Usage Arguments Details Author(s)

View source: R/distributions.r

Functions for computing density and producing random samples from a zero-inflated Poisson probability distribution.

1 2 |

`x` |
Integer values to compute densities or probabilies of |

`p` |
Probability of a zero from bernoulli process |

`lambda` |
Poisson rate parameter (mean) |

`log` |
If |

These functions provide density and random number calculations for zero-inflated Poisson observations. This distribution is defined as a finite mixture of zeros and Poisson values, where `p`

determines the weight of the pure zeros. As such, the probability of a zero is `p + (1-p)exp(-lambda)`

. And the probability of a non-zero value `x`

is `(1-p)lambda^x exp(-lambda)/x!`

.

`dzipois`

does its calculations in a way meant to reduce numerical issues with probabilities close to 0 and 1. As a result, it's not very fast.

Richard McElreath

joepowers16/rethinking documentation built on May 6, 2019, 6:57 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.