Function for computing density from a zero-augmented gamma probability distribution.
dzagamma2( x , prob , mu , scale , log=FALSE )
Values to compute densities for
Probability of a zero
Mean of gamma distribution
Scale parameter (same as scale
in dgamma
)
If TRUE
, returns log-density instead of density
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 )
.