Description Usage Arguments Details Value Author(s) References Examples
View source: R/r_moment_gamma_Weib.R
Calculates the r-th moment of the gamma or Weibull distribution.
1 | r_moment_gamma_Weib(TRpar,r,dist)
|
TRpar |
A vector of length 2, containing the shape and scale parameters of the distribution. |
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. |
In the case of the Γ(α, β) distribution the r-th moment is given by
μ_r = \int_0^{∞} x^r f(x;α, β)\,dx =β^r \frac{Γ(α+r)}{Γ(α)}, α> -r
while for the W(α, β) distribution the r-th moment is given by
μ_r = \int_0^{∞} x^r f(x;α, β)\,dx = β^r Γ≤ft(1+\frac{α}{r}\right), α> -r
A scalar, the value of the moment.
Polychronis Economou
R implementation and documentation: Polychronis Economou <peconom@upatras.gr>
Economou et. al. (2021). Hypothesis testing for the population mean and variance based on r-size biased samples, under review.
1 2 3 4 | #r-moment for the Gamma distribution for true parms=(2,3), r=1:
r_moment_gamma_Weib(c(2,3),1, "gamma")
#r-moment for for the Weibull distribution for true parms=(2,3), r=1:
r_moment_gamma_Weib(c(2,3),1, "weib")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.