
Calculate log-likelihood for Gamma-distributed data
Source:R/calc_log_likelihood_distributions.R
calc_log_likelihood_gamma.RdComputes the total log-likelihood for continuous positive data under the Gamma distribution. The shape parameter is estimated via the method of moments. Each observation can be weighted.
Arguments
- observed
Numeric vector of observed positive values.
- estimated
Numeric vector of expected means from the model (same length as
observed).- weights
Optional numeric vector of non-negative weights, same length as
observed. Default isNULL, which sets all weights to 1.- verbose
Logical; if
TRUE, prints estimated shape parameter and total log-likelihood.