r_moment_gamma_Weib {RSizeBiased} | R Documentation |
r-
th moment of the gamma or the Weibull distribution.
Description
Calculates the r-
th moment of the gamma or Weibull distribution.
Usage
r_moment_gamma_Weib(TRpar,r,dist)
Arguments
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 |
dist |
Character switch, enables the choice of distribution: type "weib" for the Weibull or "gamma" for the gamma distribution. |
Details
In the case of the \Gamma(\alpha, \beta)
distribution the r
-th moment is given by
\mu_r = \int_0^{\infty} x^r f(x;\alpha, \beta)\,dx =\beta^r \frac{\Gamma(\alpha+r)}{\Gamma(\alpha)}, \alpha> -r
while for the W(\alpha, \beta)
distribution the r
-th moment is given by
\mu_r = \int_0^{\infty} x^r f(x;\alpha, \beta)\,dx = \beta^r \Gamma\left(1+\frac{\alpha}{r}\right), \alpha> -r
Value
A scalar, the value of the moment.
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
#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")