GENLOGIS {nsRFA} | R Documentation |
GENLOGIS
provides the link between L-moments of a sample and the three parameter
generalized logistic distribution.
f.genlogis (x, xi, alfa, k) F.genlogis (x, xi, alfa, k) invF.genlogis (F, xi, alfa, k) Lmom.genlogis (xi, alfa, k) par.genlogis (lambda1, lambda2, tau3) rand.genlogis (numerosita, xi, alfa, k)
x |
vector of quantiles |
xi |
vector of genlogis location parameters |
alfa |
vector of genlogis scale parameters |
k |
vector of genlogis shape parameters |
F |
vector of probabilities |
lambda1 |
vector of sample means |
lambda2 |
vector of L-variances |
tau3 |
vector of L-CA (or L-skewness) |
numerosita |
numeric value indicating the length of the vector to be generated |
See http://en.wikipedia.org/wiki/Logistic_distribution for an introduction to the Logistic Distribution.
Definition
Parameters (3): ξ (location), α (scale), k (shape).
Range of x: -∞ < x ≤ ξ + α / k if k>0; -∞ < x < ∞ if k=0; ξ + α / k ≤ x < ∞ if k<0.
Probability density function:
f(x) = \frac{α^{-1} e^{-(1-k)y}}{(1+e^{-y})^2}
where y = -k^{-1}\log\{1 - k(x - ξ)/α\} if k \ne 0, y = (x-ξ)/α if k=0.
Cumulative distribution function:
F(x) = 1/(1+e^{-y})
Quantile function: x(F) = ξ + α[1-\{(1-F)/F\}^k]/k if k \ne 0, x(F) = ξ - α \log\{(1-F)/F\} if k=0.
k=0 is the logistic distribution.
L-moments
L-moments are defined for -1<k<1.
λ_1 = ξ + α[1/k - π / \sin (k π)]
λ_2 = α k π / \sin (k π)
τ_3 = -k
τ_4 = (1+5 k^2)/6
Parameters
k=-τ_3, α = \frac{λ_2 \sin (k π)}{k π}, ξ = λ_1 - α (\frac{1}{k} - \frac{π}{\sin (k π)}).
Lmom.genlogis
and par.genlogis
accept input as vectors of equal length. In f.genlogis
, F.genlogis
, invF.genlogis
and rand.genlogis
parameters (xi
, alfa
, k
) must be atomic.
f.genlogis
gives the density f, F.genlogis
gives the distribution function F, invF.genlogis
gives the quantile function x, Lmom.genlogis
gives the L-moments (λ_1, λ_2, τ_3, τ_4), par.genlogis
gives the parameters (xi
, alfa
, k
), and rand.genlogis
generates random deviates.
For information on the package and the Author, and for all the references, see nsRFA
.
rnorm
, runif
, EXP
, GENPAR
, GEV
, GUMBEL
, KAPPA
, LOGNORM
, P3
; 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.genlogis(ll[1],ll[2],ll[4]) f.genlogis(1800,parameters$xi,parameters$alfa,parameters$k) F.genlogis(1800,parameters$xi,parameters$alfa,parameters$k) invF.genlogis(0.7697433,parameters$xi,parameters$alfa,parameters$k) Lmom.genlogis(parameters$xi,parameters$alfa,parameters$k) rand.genlogis(100,parameters$xi,parameters$alfa,parameters$k) Rll <- regionalLmoments(x,fac); Rll parameters <- par.genlogis(Rll[1],Rll[2],Rll[4]) Lmom.genlogis(parameters$xi,parameters$alfa,parameters$k)