zipois-extensions | R Documentation |
Score function for the zero-inflated Poisson
distribution with parameters lambda
(= mean of the
uninflated distribution) and inflation probability
pi
(for structural zeros).
szipois(x, lambda, pi, parameter = c("lambda", "pi"), drop = TRUE)
x |
vector of (non-negative integer) quantiles. |
lambda |
vector of non-negative means of the uninflated Poisson distribution. |
pi |
vector of zero inflation probabilities for structural zeros. |
parameter |
character. Should the derivative with respect to
|
drop |
logical. Should the result be a matrix ( |
The uninflated Poisson distribution has density
f(x) = \frac{\lambda^x e^{-\lambda}}{x!}
for x = 0, 1, 2, \ldots
. The zero-inflated density is then simply obtained as
g(x) = \pi \cdot I_{\{0\}}(x) + (1 - \pi) \cdot f(x)
where I
is the indicator function (for the point mass at zero).
szipois
gives the score function (= derivative of
the log-density with respect to lambda and/or pi).
dzipois
, dpois
, zeroinfl
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.