View source: R/distributions.r
dzagamma2 | R Documentation |
Function for computing density from a zero-augmented gamma probability distribution.
dzagamma2( x , prob , mu , scale , log=FALSE )
x |
Values to compute densities for |
prob |
Probability of a zero |
mu |
Mean of gamma distribution |
scale |
Scale parameter (same as |
log |
If |
This distribution is defined as a finite mixture of zeros and strictly positive gamma distributed values, where prob
determines the weight of the zeros. As such, the probability of a zero is prob
, and the probability of a non-zero value x
is (1-prob)*dgamma( x , mu/scale , scale )
.
Richard McElreath
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.