log_Lik_Weib_gamma_weighted {RSizeBiased} | R Documentation |
Log likelihood function for the weighted gamma or Weibull distributions.
Description
Calculates the log-likelihood function of the weighted gamma or Weibull (depends on user input) distribution.
Usage
log_Lik_Weib_gamma_weighted(TRpar,datain,r,dist)
Arguments
TRpar |
A vector of length 2, containing the shape and scale parameters of the distribution. |
datain |
The available sample points. |
r |
The size (order) of the distribution. The special cases |
dist |
Character switch, enables the choice of distribution: type "weib" for the Weibull or "gamma" for the gamma distribution. |
Details
The log likelihood function of the weighted gamma distribution is defined by
where is the density of the
size biased gamma distribution. Setting
corresponds to the log likelihood of the Gamma distribution.
In the case of Weibull, the log likelihood is defined by
where is the density of the
size biased Weibull distribution. Setting
corresponds to the log likelihood of the Weibull distribution.
Value
A scalar, the result of the log likelihood calculation.
Author(s)
Polychronis Economou
R implementation and documentation: Polychronis Economou <peconom@upatras.gr>
References
Economou et. al. (2021). Hypothesis testing for the population mean and variance based on r-size biased samples, under review.
Examples
#Log-likelihood for the gamma distribution for true parms=(2,3), r=0:
log_Lik_Weib_gamma_weighted(c(2,3), rgamma(100, shape=2, scale=3), 0, "gamma")
#Log-likelihood for the Weibull distribution for true parms=(2,3), r=0:
log_Lik_Weib_gamma_weighted(c(2,3), rweibull(100, shape=2, scale=3), 0, "weib")