Learn R Programming

rethinking (version 2.13)

dzagamma2: Zero-augmented gamma probability density

Description

Function for computing density from a zero-augmented gamma probability distribution.

Usage

dzagamma2( x , prob , mu , scale , log=FALSE )

Arguments

x

Values to compute densities for

prob

Probability of a zero

mu

Mean of gamma distribution

scale

Scale parameter (same as scale in dgamma)

log

If TRUE, returns log-density instead of density

Details

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 ).