View source: R/bayesian_cure_rate_model.R
log_gamma_mixture | R Documentation |
Computes the logarithm of the probability density function and cumulative density function per observation for each observation under a Gamma mixture model.
log_gamma_mixture(y, a1, a2, p, c_under = 1e-09)
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. |
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. |
Panagiotis Papastamoulis
y <- runif(10)
a1 <- c(1,2)
a2 <- c(1,1)
p <- c(0.9,0.1)
log_gamma_mixture(y, a1, a2, p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.