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 r=1,2,3 correspond to length, area, volume biased samples respectively and are the most frequently encountered in practice. The case r=0 corresponds to random samples from the Gamma distribution.

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

\log L = \sum_{i=1}^n log f_r(X_i; \theta)

where f_r(x; \theta) is the density of the r-size biased gamma distribution. Setting r=0 corresponds to the log likelihood of the Gamma distribution.

In the case of Weibull, the log likelihood is defined by

\log L = \sum_{i=1}^n log f_r(X_i; \theta)

where f_r(x; \theta) is the density of the r-size biased Weibull distribution. Setting r=0 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")

[Package RSizeBiased version 0.1.0 Index]