Three parameters Pearson type III distribution and L-moments
P3
provides the link between L-moments of a sample and the three parameter Pearson type III distribution.
f.gamma (x, xi, beta, alfa) F.gamma (x, xi, beta, alfa) invF.gamma (F, xi, beta, alfa) Lmom.gamma (xi, beta, alfa) par.gamma (lambda1, lambda2, tau3) rand.gamma (numerosita, xi, beta, alfa) mom2par.gamma (mu, sigma, gamm) par2mom.gamma (alfa, beta, xi)
x
: vector of quantilesmu
: vector of gamma meansigma
: vector of gamma standard deviationgamm
: vector of gamma third momentF
: vector of probabilitieslambda1
: vector of sample meanslambda2
: vector of L-variancestau3
: vector of L-CA (or L-skewness)numerosita
: numeric value indicating the length of the vector to be generatedalfa
: vector of gamma shape parametersbeta
: vector of gamma scale parametersxi
: vector of gamma location parametersSee https://en.wikipedia.org/wiki/Pearson_distribution for an introduction to the Pearson distribution, and https://en.wikipedia.org/wiki/Gamma_distribution for an introduction to the Gamma distribution (the Pearson type III distribution is, essentially, a Gamma distribution with 3 parameters).
Definition
Parameters (3): (location), (scale), (shape). Moments (3): (mean), (standard deviation), (skewness).
If , let , , and . If , then the range of is and
If , then the distribution is Normal, the range of is and
where and .
If , then the range of is and
In each case, has no explicit analytical form. Here is the gamma function, defined as
and
is the incomplete gamma function.
is the exponential distribution; is the Normal distribution; is the reverse exponential distribution.
The parameters , and are the conventional moments of the distribution.
L-moments
Assuming , L-moments are defined for .
where is the incomplete beta function ratio
There is no simple expression for . Here we use the rational-funcion approximation given by Hosking and Wallis (1997, pp. 201-202).
The corresponding results for are obtained by changing the signs of , and wherever they occur above.
Parameters
is obtained with an approximation. If , let and use
if , let and use
Given , then , , .
Lmom.gamma
and par.gamma
accept input as vectors of equal length. In f.gamma
, F.gamma
, invF.gamma
and rand.gamma
parameters (mu
, sigma
, gamm
) must be atomic.
f.gamma
gives the density , F.gamma
gives the distribution function , invFgamma
gives the quantile function , Lmom.gamma
gives the L-moments (, , , ), par.gamma
gives the parameters (mu
, sigma
, gamm
), and rand.gamma
generates random deviates.
mom2par.gamma
returns the parameters , and , given the parameters (moments) , , .
For information on the package and the Author, and for all the references, see nsRFA
.
rnorm
, runif
, EXP
, GENLOGIS
, GENPAR
, GEV
, GUMBEL
, KAPPA
, LOGNORM
; DISTPLOTS
, GOFmontecarlo
, Lmoments
.
data(hydroSIMN) annualflows summary(annualflows) x <- annualflows["dato"][,] fac <- factor(annualflows["cod"][,]) split(x,fac) camp <- split(x,fac)$"45" ll <- Lmoments(camp) parameters <- par.gamma(ll[1],ll[2],ll[4]) f.gamma(1800,parameters$xi,parameters$beta,parameters$alfa) F.gamma(1800,parameters$xi,parameters$beta,parameters$alfa) invF.gamma(0.7511627,parameters$xi,parameters$beta,parameters$alfa) Lmom.gamma(parameters$xi,parameters$beta,parameters$alfa) rand.gamma(100,parameters$xi,parameters$beta,parameters$alfa) Rll <- regionalLmoments(x,fac); Rll parameters <- par.gamma(Rll[1],Rll[2],Rll[4]) Lmom.gamma(parameters$xi,parameters$beta,parameters$alfa) moments <- par2mom.gamma(parameters$alfa,parameters$beta,parameters$xi); moments mom2par.gamma(moments$mu,moments$sigma,moments$gamm)
Useful links