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)
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
vector of quantiles
vector of gamma mean
vector of gamma standard deviation
vector of gamma third moment
vector of probabilities
vector of sample means
vector of L-variances
vector of L-CA (or L-skewness)
numeric value indicating the length of the vector to be generated
vector of gamma shape parameters
vector of gamma scale parameters
vector of gamma location parameters
See 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):
If
If
If
In each case,
The parameters
L-moments
Assuming
There is no simple expression for
The corresponding results for
Parameters
Given
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.
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)
Run the code above in your browser using DataLab