log_gamma_mixture {bayesCureRateModel} | R Documentation |
PDF and CDF of a Gamma mixture distribution
Description
Computes the logarithm of the probability density function and cumulative density function per observation for each observation under a Gamma mixture model.
Usage
log_gamma_mixture(y, a1, a2, p, c_under = 1e-09)
Arguments
y |
observed data |
a1 |
vector containing the shape parameters of each Gamma mixture component |
a2 |
vector containing the rate parameters of each Gamma mixture component |
p |
vector of mixing proportions |
c_under |
threshold for underflows. |
Value
A list containing the following entries
log_f |
natural logarithm of the pdf, evaluated at each datapoint. |
log_F |
natural logarithm of the CDF, evaluated at each datapoint. |
Author(s)
Panagiotis Papastamoulis
Examples
y <- runif(10)
a1 <- c(1,2)
a2 <- c(1,1)
p <- c(0.9,0.1)
log_gamma_mixture(y, a1, a2, p)
[Package bayesCureRateModel version 1.1 Index]