Package 'LMoFit'

Title: Advanced L-Moment Fitting of Distributions
Description: A complete framework for frequency analysis is provided by 'LMoFit'. It has functions related to the determination of sample L-moments as in Hosking, J.R.M. (1990) <doi:10.1111/j.2517-6161.1990.tb01775.x>, the fitting of various distributions as in Zaghloul et al. (2020) <doi:10.1016/j.advwatres.2020.103720> and Hosking, J.R.M. (2019) <https://CRAN.R-project.org/package=lmom>, besides plotting and manipulating L-space diagrams as in Papalexiou, S.M. & Koutsoyiannis, D. (2016) <doi:10.1016/j.advwatres.2016.05.005> for two-shape parametric distributions on the L-moment ratio diagram. Additionally, the quantile, probability density, and cumulative probability functions of various distributions are provided in a user-friendly manner.
Authors: Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]
Maintainer: Mohanad Zaghloul <[email protected]>
License: GPL-3
Version: 0.1.7
Built: 2025-03-10 02:33:28 UTC
Source: https://github.com/cran/LMoFit

Help Index


Comparing sample L-moment ratios with L-spaces of various distributions on the L-moments ratio diagram

Description

Comparing sample L-moment ratios with L-spaces of various distributions on the L-moments ratio diagram

Usage

com_sam_lspace(sample, type = "m", Dist = "BrIII", color = "red", shape = 8)

Arguments

sample

for a single site, sample is a vector of observations, e.x. FLOW_AMAX. For multiple sites, sample is a dataframe consisting of multiple columns where each column has the data observed at one site; this dataframe should have column names as station names, e.x. FLOW_AMAX_MULT.

type

the type of the sample. It can be "s" for single site, the default, or "m" for multiple sites.

Dist

select the distribution to plot its L-space in the background. This can be "BrIII" for Burr Typr-III distribution, "BrXII" for Burr Typr-XII distribution, or "GG" for Generalized Gamma distribution. The default Dist is "BrIII".

color

color of the L-point/s, default is "red".

shape

shape of the L-point/s, default is 8.

Value

ggplot plot comparing sample/s L-point/s with L-space of a distribution on the L-moment ratio diagram

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

com_plot_BrIII <- com_sam_lspace(LMoFit::FLOW_AMAX, type = "s", Dist = "BrIII")
com_plot_BrXII <- com_sam_lspace(LMoFit::FLOW_AMAX, type = "s", Dist = "BrXII")
com_plot_GG <- com_sam_lspace(LMoFit::FLOW_AMAX, type = "s", Dist = "GG")
com_plot_BrIII <- com_sam_lspace(LMoFit::FLOW_AMAX_MULT, type = "m", Dist = "BrIII")
com_plot_BrXII <- com_sam_lspace(LMoFit::FLOW_AMAX_MULT, type = "m", Dist = "BrXII")
com_plot_GG <- com_sam_lspace(LMoFit::FLOW_AMAX_MULT, type = "m", Dist = "GG")

Condition of sample lpoints, as inside/outside of specific L-spaces on the L-moments ratio diagram, using sample.

Description

Condition of sample lpoints, as inside/outside of specific L-spaces on the L-moments ratio diagram, using sample.

Usage

con_sam_lspace(sample, type = "s", Dist = "BrIII")

Arguments

sample

for a single site, sample is a vector of observations, e.x. FLOW_AMAX. For multiple sites, sample is a dataframe consisting of multiple columns where each column has the data observed at one site; this dataframe should have column names as station names, e.x. FLOW_AMAX_MULT.

type

the type of the sample. It can be "s" for single site, the default, or "m" for multiple sites.

Dist

select the distribution to plot its L-space in the background. This can be "BrIII" for Burr Typr-III distribution, "BrXII" for Burr Typr-XII distribution, or "GG" for Generalized Gamma distribution. The default Dist is "BrIII".

Value

The condition of the L-points in regards to the selected L-space as inside or outside.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

con_sam_lspace(LMoFit::FLOW_AMAX, type = "s", Dist = "BrIII")
con_sam_lspace(LMoFit::FLOW_AMAX, type = "s", Dist = "BrXII")
con_sam_lspace(LMoFit::FLOW_AMAX, type = "s", Dist = "GG")
con_sam_lspace(LMoFit::FLOW_AMAX_MULT, type = "m", Dist = "BrIII")
con_sam_lspace(LMoFit::FLOW_AMAX_MULT, type = "m", Dist = "BrXII")
con_sam_lspace(LMoFit::FLOW_AMAX_MULT, type = "m", Dist = "GG")

Condition of sample lpoints, as inside/outside of specific L-spaces on the L-moments ratio diagram, using sample lmoments.

Description

Condition of sample lpoints, as inside/outside of specific L-spaces on the L-moments ratio diagram, using sample lmoments.

Usage

con_samlmom_lspace(samplelmom, Dist = "BrIII")

Arguments

samplelmom

L-moments as c(l1, l2, l3, l4, t2, t3, t4). Use get_sample_lmom() to obtain these lmoments.

Dist

select the distribution to plot its L-space in the background. This can be "BrIII" for Burr Typr-III distribution, "BrXII" for Burr Typr-XII distribution, or "GG" for Generalized Gamma distribution. The default Dist is "BrIII". The default is set to BrIII.

Value

The condition of the L-points in regards to the selected L-space as inside or outside.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

sample <- LMoFit::FLOW_AMAX
samplelmom <- get_sample_lmom(x = sample)
con_samlmom_lspace(samplelmom, Dist = "BrIII")
con_samlmom_lspace(samplelmom, Dist = "BrXII")
con_samlmom_lspace(samplelmom, Dist = "GG")

Probability density function of BrIII distribution

Description

Probability density function of BrIII distribution

Usage

dBrIII(x, para = c(1, 2, 0.5))

Arguments

x

quantile/s

para

parameters as c(scale, shape1, shape2)

Value

Probability density function

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

d <- dBrIII(x = 108.4992, para = c(10, 0.25, 0.5))

Probability density function of BrXII distribution

Description

Probability density function of BrXII distribution

Usage

dBrXII(x, para = c(1, 2, 0.5))

Arguments

x

quantile/s

para

parameters as c(scale, shape1, shape2)

Value

Probability density function

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

d <- dBrXII(x = 108.4992, para = c(10, 0.25, 0.5))

Probability density function of Gamma distribution

Description

Probability density function of Gamma distribution

Usage

dgam(x, para = c(1, 2, 0.5))

Arguments

x

quantile/s

para

parameters as c(shape, scale)

Value

Probability density function

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

d <- dgam(x = 0.1, para = c(0.1, 0.2))

Probability density function of GEV distribution

Description

Probability density function of GEV distribution

Usage

dgev(x, para)

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Probability density function

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

d <- dgev(x = 108.4992, para = c(10, 1, 1))

Probability density function of Generalized Gamma (GG) distribution

Description

Probability density function of Generalized Gamma (GG) distribution

Usage

dGG(x, para = c(10, 0.25, 0.5))

Arguments

x

quantile/s

para

parameters as c(scale, shape1, shape2)

Value

Probability density function

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

d <- dGG(x = 108.4992, para = c(10, 0.25, 0.5))

Probability density function of Generalized Logestic Distribution

Description

Probability density function of Generalized Logestic Distribution

Usage

dglo(x, para = c(1, 2, 0.5))

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Probability density function

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

d <- dglo(x = 0.1, para = c(1, 2, 0.5))

Probability density function of Generalized normal Distribution

Description

Probability density function of Generalized normal Distribution

Usage

dgno(x, para = c(1, 2, 0.5))

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Probability density function

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

d <- dgno(x = 0.1, para = c(1, 2, 0.5))

Probability density function of Generalized Pareto Distribution

Description

Probability density function of Generalized Pareto Distribution

Usage

dgpa(x, para)

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Probability density function

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

d <- dgpa(x = 0.1, para = c(1, 2, 0.5))

Probability density function of Lognormal-3 Distribution

Description

Probability density function of Lognormal-3 Distribution

Usage

dln3(x, para = c(0, 0, 1))

Arguments

x

quantile/s

para

parameters as c(zeta, mu, sigma) that is c(lower bound, mean on log scale, standard deviation on log scale).

Value

Probability density function

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

d <- dln3(x = 12, para = c(0, 0, 1))

Probability density function of Normal Distribution

Description

Probability density function of Normal Distribution

Usage

dnor(x, para = c(1, 2))

Arguments

x

quantile/s

para

parameters as c(location, scale)

Value

Probability density function

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

d <- dnor(x = 1.5, para = c(1, 2))

Probability density function of Pearson type-3 Distribution

Description

Probability density function of Pearson type-3 Distribution

Usage

dpe3(x, para = c(10, 1, 1.5))

Arguments

x

quantile/s

para

parameters as c(mu, sigma, gamma) that is c(location, scale, shape).

Value

Probability density function

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

d <- dpe3(x = 12, para = c(10, 1, 1.5))

Fit Burr Type-III (BrIII) Distribution

Description

Fit Burr Type-III (BrIII) Distribution

Usage

fit_BrIII(sl1, st2, st3)

Arguments

sl1

1st l-moments

st2

2nd l-moment ratio

st3

3rd l-moment ratio

Value

A dataframe containing the scale parameter, the shape1 parameter, the shape2 parameter, the squared error of scale parameter, and the squared error of shape parameter

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

BrIII_par_valid <- fit_BrIII(sl1 = 10, st2 = 0.25, st3 = 0.1)
BrIII_par_invalid <- fit_BrIII(sl1 = 10, st2 = 0.5, st3 = 0.8)

Fit Burr Type-XII (BrXII) Distribution

Description

Fit Burr Type-XII (BrXII) Distribution

Usage

fit_BrXII(sl1, st2, st3)

Arguments

sl1

1st l-moments

st2

2nd l-moment ratio

st3

3rd l-moment ratio

Value

A dataframe containing the scale parameter, the shape1 parameter, the shape2 parameter, the squared error of the scale parameter, and the squared error of the shape parameters.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

BrXII_par_valid <- fit_BrXII(sl1 = 10, st2 = 0.25, st3 = 0.25)
BrXII_par_invalid <- fit_BrXII(sl1 = 10, st2 = 0.5, st3 = 0.8)

Fit Gamma distribution using the 'lmom' package

Description

Fit Gamma distribution using the 'lmom' package

Usage

fit_gam(sl1, sl2, st3, st4)

Arguments

sl1

sample 1st l-moment

sl2

sample 2nd l-moment

st3

sample 3rd l-moment ratio

st4

sample 4th l-moment ratio

Value

A vector of parameters as alpha (shape) and beta (scale).

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

gam_par <- fit_gam(15, 1.7, 0.04, -0.02)

Fit GEV distribution

Description

Fit GEV distribution

Usage

fit_gev(sl1, sl2, st3)

Arguments

sl1

sample 1st l-moment

sl2

sample 2nd l-moment

st3

sample 3rd l-moment ratio

Value

A dataframe containing the location parameter, the scale parameter, the shape parameter, and the squared error of shape parameters.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

GEV_par <- fit_gev(sl1 = 10, sl2 = 0.5, st3 = 0.8)

Fit Generalized Gamma (GG) Distribution

Description

Fit Generalized Gamma (GG) Distribution

Usage

fit_GG(sl1, st2, st3)

Arguments

sl1

1st l-moments

st2

2nd l-moment ratio

st3

3rd l-moment ratio

Value

A dataframe containing the scale parameter, the shape1 parameter, the shape2 parameter, the squared error of scale parameter, and the squared error of shape parameters.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

GG_par_valid <- fit_GG(sl1 = 10, st2 = 0.4, st3 = 0.2)
GG_par_invalid <- fit_GG(sl1 = 1, st2 = 0.25, st3 = 0.25)

Fit Generalized Logistic distribution using the 'lmom' package

Description

Fit Generalized Logistic distribution using the 'lmom' package

Usage

fit_glo(sl1, sl2, st3, st4)

Arguments

sl1

sample 1st l-moment

sl2

sample 2nd l-moment

st3

sample 3rd l-moment ratio

st4

sample 4th l-moment ratio

Value

A vector of parameters as xi (location), alpha (scale), and k (shape).

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

glo_par <- fit_glo(15, 1.7, 0.04, -0.02)

Fit Generalized Normal distribution using the 'lmom' package

Description

Fit Generalized Normal distribution using the 'lmom' package

Usage

fit_gno(sl1, sl2, st3, st4)

Arguments

sl1

sample 1st l-moment

sl2

sample 2nd l-moment

st3

sample 3rd l-moment ratio

st4

sample 4th l-moment ratio

Value

A vector of parameters as xi (location), alpha (scale), and k (shape).

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

gno_par <- fit_gno(15, 1.7, 0.04, -0.02)

Fit Generalized Pareto distribution using the 'lmom' package

Description

Fit Generalized Pareto distribution using the 'lmom' package

Usage

fit_gpa(sl1, sl2, st3, st4)

Arguments

sl1

sample 1st l-moment

sl2

sample 2nd l-moment

st3

sample 3rd l-moment ratio

st4

sample 4th l-moment ratio

Value

A vector of parameters as xi (location), alpha (scale), and k (shape).

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

gpa_par <- fit_gpa(15, 1.7, 0.04, -0.02)

Fit LogNormal-3 distribution using the 'lmom' package

Description

Fit LogNormal-3 distribution using the 'lmom' package

Usage

fit_ln3(sl1, sl2, st3, st4)

Arguments

sl1

sample 1st l-moment

sl2

sample 2nd l-moment

st3

sample 3rd l-moment ratio

st4

sample 4th l-moment ratio

Value

A vector of parameters as zeta (lower bound), mu (mean on log-scale), and sigma (st.dev. on log-scale)

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

ln3_par <- fit_ln3(15, 1.7, 0.04, -0.02)

Fit Normal distribution using the 'lmom' package

Description

Fit Normal distribution using the 'lmom' package

Usage

fit_nor(sl1, sl2, st3, st4)

Arguments

sl1

sample 1st l-moment

sl2

sample 2nd l-moment

st3

sample 3rd l-moment ratio

st4

sample 4th l-moment ratio

Value

A vector of parameters as mu (location) and sigma (scale).

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

nor_par <- fit_nor(15, 1.7, 0.04, -0.02)

Fit Pearson Type-3 distribution using the 'lmom' package

Description

Fit Pearson Type-3 distribution using the 'lmom' package

Usage

fit_pe3(sl1, sl2, st3, st4)

Arguments

sl1

sample 1st l-moment

sl2

sample 2nd l-moment

st3

sample 3rd l-moment ratio

st4

sample 4th l-moment ratio

Value

A vector of parameters as mu (location), sigma (scale), and gamma (shape).

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

pe3_par <- fit_pe3(15, 1.7, 0.04, -0.02)

Annual maximum flow data at Water Survey of Canada WSC flow gauge number 08NA002 in BC, Vancouver, Canada. Lat: 51°14'36.8¨ N, Long: 116°54'46.6¨ W.

Description

Annual maximum flow data at Water Survey of Canada WSC flow gauge number 08NA002 in BC, Vancouver, Canada. Lat: 51°14'36.8¨ N, Long: 116°54'46.6¨ W.

Usage

FLOW_AMAX

Format

A vector of observations of length equal to 112

flow

annual maximum flow observed per each year at one site

Source

coded in data-raw


Annual maximum flow data at 10 hypothetical flow gauge.

Description

Annual maximum flow data at 10 hypothetical flow gauge.

Usage

FLOW_AMAX_MULT

Format

A data frame with 112 rows and 10 variables:

flow_st1

annual maximum flow observed per each year at site 1

flow_st2

annual maximum flow observed per each year at site 2

flow_st3

annual maximum flow observed per each year at site 3

flow_st4

annual maximum flow observed per each year at site 4

flow_st5

annual maximum flow observed per each year at site 5

flow_st6

annual maximum flow observed per each year at site 6

flow_st7

annual maximum flow observed per each year at site 7

flow_st8

annual maximum flow observed per each year at site 8

flow_st9

annual maximum flow observed per each year at site 9

flow_st10

annual maximum flow observed per each year at site 10

Source

coded in data-raw


Get julian date from the begining of the year

Description

Get julian date from the begining of the year

Usage

get_julian(x)

Arguments

x

date or a series of dates such as, as.Date("yyyy-mm-dd")

Value

A julian date between 1 and 365, note that in leap years the day 366 is considered as 365

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

get_julian(x = as.Date("1979-01-15"))

Estimate sample L-moments and L-moment ratios

Description

Estimate sample L-moments and L-moment ratios

Usage

get_sample_lmom(x)

Arguments

x

a series of quantiles

Value

A dataframe containing the 1st l-moment, the 2nd l-moment, the 3rd l-moment, the 4th l-moment, the 2nd l-moment ratio "L-variation", the 3rd l-moment ratio "L-skewness", and the 4th l-moment ratio "L-kurtosis"

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

sample_lmom <- get_sample_lmom((rnorm(n = 500, mean = 10, sd = 0.5)))

L-space of Burr Type-III Distribution (BrIII)

Description

This is a plot of the L-space of BrIII Distribution with L-variation on x-axis and L-skewness on y-axis. The L-space is bounded by shape1 in the range of 0.01 to 150.01, and by shape2 in the range of 0.005 to 0.999.

Usage

lspace_BrIII

Format

A ggplot

data
layers
scales
mapping
theme
coordinates
facet
plot_env
labels

Source

coded in data-raw


coordinates of the L-space of Burr Type-III Distribution (BrIII)

Description

This is a plot of the L-space of BrIII Distribution with L-variation on x-axis and L-skewness on y-axis. The L-space is bounded by shape1 in the range of 0.01 to 150.01, and by shape2 in the range of 0.005 to 0.999.

Usage

lspace_BrIII.xy

Format

A ggplot

x

l-variatoin "t2"

y

l-skewness "t3"

Source

coded in data-raw


L-space of Burr Type-XII Distribution (BrXII)

Description

This is a plot of the L-space of BrXII Distribution with L-variation on x-axis and L-skewness on y-axis. The L-space is bounded by shape1 in the range of 0.1 to 150, and by shape2 in the range of 0.001 to 1.

Usage

lspace_BrXII

Format

A ggplot

data
layers
scales
mapping
theme
coordinates
facet
plot_env
labels

Source

coded in data-raw


coordinates of the L-space of Burr Type-XII Distribution (BrXII)

Description

This is a plot of the L-space of BrXII Distribution with L-variation on x-axis and L-skewness on y-axis. The L-space is bounded by shape1 in the range of 0.1 to 150, and by shape2 in the range of 0.001 to 1.

Usage

lspace_BrXII.xy

Format

A ggplot

x

l-variatoin "t2"

y

l-skewness "t3"

Source

coded in data-raw


L-space of Generalized Gamma Distribution (GG)

Description

This is a plot of the L-space of GG Distribution with L-variation on x-axis and L-skewness on y-axis. The L-space is bounded by shape1 in the range of 0.1 to 5.9, and by shape2 in the range of 0.19 to 38.

Usage

lspace_GG

Format

A ggplot

data
layers
scales
mapping
theme
coordinates
facet
plot_env
labels

Source

coded in data-raw


coordinates of the L-space of Generalized Gamma Distribution (GG)

Description

This is a plot of the L-space of GG Distribution with L-variation on x-axis and L-skewness on y-axis. The L-space is bounded by shape1 in the range of 0.1 to 5.9, and by shape2 in the range of 0.19 to 38.

Usage

lspace_GG.xy

Format

A ggplot

x

l-variatoin "t2"

y

l-skewness "t3"

Source

coded in data-raw


Cumulative distribution function of BrIII distribution

Description

Cumulative distribution function of BrIII distribution

Usage

pBrIII(x, para = c(1, 2, 0.5))

Arguments

x

quantile/s

para

parameters as c(scale, shape1, shape2)

Value

Non-exceedance probability from the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

u <- pBrIII(x = 108.4992, para = c(10, 0.25, 0.5))

Cumulative distribution function of BrXII distribution

Description

Cumulative distribution function of BrXII distribution

Usage

pBrXII(x, para = c(1, 2, 0.5))

Arguments

x

quantile/s

para

parameters as c(scale, shape1, shape2)

Value

Non-exceedance probability from the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

u <- pBrXII(x = 108.4992, para = c(10, 0.25, 0.5))

Emperical cumulative distribution function

Description

Emperical cumulative distribution function

Usage

pemp(data)

Arguments

data

quantile/s

Value

A dataframe containing two columns as the sorted observations and the corresponding empirical probability of non-exceedance

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

output <- pemp(data = runif(n = 50, min = 10, max = 100))

Cumulative distribution function of Gamma distribution

Description

Cumulative distribution function of Gamma distribution

Usage

pgam(x, para = c(1.5, 1))

Arguments

x

quantile/s

para

parameters as c(shape, scale)

Value

Non-exceedance probability from the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

u <- pgam(x = 0.1, para = c(0.1, 0.2))

Cumulative distribution function of GEV distribution

Description

Cumulative distribution function of GEV distribution

Usage

pgev(x, para)

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Non-exceedance probability from the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

u <- pgev(x = 108.4992, para = c(10, 1, 1))

Cumulative distribution function of Generalized Gamma (GG) distribution

Description

Cumulative distribution function of Generalized Gamma (GG) distribution

Usage

pGG(x, para = c(10, 0.25, 0.5))

Arguments

x

quantile/s

para

parameters as c(scale, shape1, shape2)

Value

Non-exceedance probability from the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

u <- pGG(x = 108.4992, para = c(10, 0.25, 0.5))

Cumulative distribution function of Generalized Logistic Distribution

Description

Cumulative distribution function of Generalized Logistic Distribution

Usage

pglo(x, para = c(10, 1.5, 1))

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Non-exceedance probability from the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

u <- pglo(x = 0.1, para = c(10, 0.1, 0.2))

Cumulative distribution function of Generalized Normal Distribution

Description

Cumulative distribution function of Generalized Normal Distribution

Usage

pgno(x, para = c(10, 1.5, 1))

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Non-exceedance probability from the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

u <- pgno(x = 10.1, para = c(10, 0.1, 0.2))

Cumulative distribution function of Generalized Pareto Distribution

Description

Cumulative distribution function of Generalized Pareto Distribution

Usage

pgpa(x, para = c(1, 1, 1))

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Non-exceedance probability from the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

u <- pgpa(x = 1.2, para = c(1, 2, 0.5))

Cumulative distribution function of Lognormal-3 Distribution

Description

Cumulative distribution function of Lognormal-3 Distribution

Usage

pln3(x, para = c(0, 0, 1))

Arguments

x

quantile/s

para

parameters as c(zeta, mu, sigma) that is c(lower bound, mean on log scale, standard deviation on log scale).

Value

Non-exceedance probability from the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

u <- pln3(x = 12, para = c(0, 0, 1))

Cumulative distribution function of Noramal Distribution

Description

Cumulative distribution function of Noramal Distribution

Usage

pnor(x, para = c(10, 1.5))

Arguments

x

quantile/s

para

parameters as c(location, scale)

Value

Non-exceedance probability from the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

u <- pnor(x = 11, para = c(10, 1.5))

Cumulative distribution function of Pearson type-3 Distribution

Description

Cumulative distribution function of Pearson type-3 Distribution

Usage

ppe3(x, para = c(10, 1, 1.5))

Arguments

x

quantile/s

para

parameters as c(mu, sigma, gamma) that are c(location, scale, shape).

Value

Non-exceedance probability from the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

u <- ppe3(x = 12, para = c(10, 1, 1.5))

Quantile distribution function of BrIII distribution

Description

Quantile distribution function of BrIII distribution

Usage

qBrIII(u = NULL, RP = 1/(1 - u), para)

Arguments

u

non-exceedance probability

RP

Return Period "don't use in case u is used"

para

parameters as c(scale, shape1, shape2)

Value

Quantile value/s using the inverse of the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

x <- qBrIII(u = 0.99, para = c(1, 10, 0.8))
x <- qBrIII(RP = 100, para = c(1, 10, 0.8))

Quantile distribution function of BrXII distribution

Description

Quantile distribution function of BrXII distribution

Usage

qBrXII(u = NULL, RP = 1/(1 - u), para)

Arguments

u

non-exceedance probability

RP

Return Period "don't use in case u is used"

para

parameters as c(scale, shape1, shape2)

Value

Quantile value/s using the inverse of the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

x <- qBrXII(u = 0.99, para = c(1, 10, 0.8))
x <- qBrXII(RP = 100, para = c(1, 10, 0.8))

Quantile distribution function of Gamma distribution

Description

Quantile distribution function of Gamma distribution

Usage

qgam(u = NULL, RP = 1/(1 - u), para)

Arguments

u

non-exceedance probability

RP

Return Period "don't use in case u is used"

para

parameters as c(shape, scale)

Value

Quantile value/s using the inverse of the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

x <- qgam(u = 0.99, para = c(0.1, 0.2))
x <- qgam(RP = 100, para = c(0.1, 0.2))

Quantile distribution function of GEV distribution

Description

Quantile distribution function of GEV distribution

Usage

qgev(u = NULL, RP = 1/(1 - u), para)

Arguments

u

non-exceedance probability

RP

Return Period "don't use in case u is used"

para

parameters as c(location, scale, shape)

Value

Quantile value/s using the inverse of the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

x <- qgev(u = 0.99, para = c(10, 1, 1))
x <- qgev(RP = 100, para = c(10, 1, 1))

Quantile distribution function of the Generalized Gamma (GG) distribution

Description

Quantile distribution function of the Generalized Gamma (GG) distribution

Usage

qGG(u = NULL, RP = 1/(1 - u), para)

Arguments

u

non-exceedance probability

RP

Return Period "don't use in case u is used"

para

parameters as c(scale, shape1, shape2)

Value

Quantile value/s using the inverse of the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

x <- qGG(u = 0.99, para = c(10, 0.25, 0.5))
x <- qGG(RP = 100, para = c(10, 0.25, 0.5))

Quantile distribution function of Generalized Logistic Distribution

Description

Quantile distribution function of Generalized Logistic Distribution

Usage

qglo(u = NULL, RP = 1/(1 - u), para)

Arguments

u

non-exceedance probability

RP

Return Period "don't use in case u is used"

para

parameters as c(location, scale, shape)

Value

Quantile value/s using the inverse of the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

x <- qglo(u = 0.99, para = c(10, 0.1, 0.2))
x <- qglo(RP = 100, para = c(10, 0.1, 0.2))

Quantile distribution function of Generalized normal Distribution

Description

Quantile distribution function of Generalized normal Distribution

Usage

qgno(u = NULL, RP = 1/(1 - u), para)

Arguments

u

non-exceedance probability

RP

Return Period "don't use in case u is used"

para

parameters as c(location, scale, shape)

Value

Quantile value/s using the inverse of the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

x <- qgno(u = 0.99, para = c(10, 0.1, 0.2))
x <- qgno(RP = 100, para = c(10, 0.1, 0.2))

Quantile distribution function of Generalized Pareto Distribution

Description

Quantile distribution function of Generalized Pareto Distribution

Usage

qgpa(u = NULL, RP = 1/(1 - u), para)

Arguments

u

non-exceedance probability

RP

Return Period "don't use in case u is used"

para

parameters as c(location, scale, shape)

Value

Quantile value/s using the inverse of the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

x <- qgpa(u = 0.99, para = c(10, 0.1, 0.2))
x <- qgpa(RP = 100, para = c(10, 0.1, 0.2))

Quantile distribution function of Lognormal-3 Distribution

Description

Quantile distribution function of Lognormal-3 Distribution

Usage

qln3(u = NULL, RP = 1/(1 - u), para)

Arguments

u

non-exceedance probability

RP

Return Period "don't use in case u is used"

para

parameters as c(zeta, mu, sigma) that is c(lower bound, mean on log scale, standard deviation on log scale).

Value

Quantile value/s using the inverse of the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

x <- qln3(u = 0.99, para = c(0, 0, 1))
x <- qln3(RP = 100, para = c(0, 0, 1))

Quantile distribution function of Normal Distribution

Description

Quantile distribution function of Normal Distribution

Usage

qnor(u = NULL, RP = 1/(1 - u), para)

Arguments

u

non-exceedance probability

RP

Return Period "don't use in case u is used"

para

parameters as c(location, scale)

Value

Quantile value/s using the inverse of the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

x <- qnor(u = 0.99, para = c(10, 0.1))
x <- qnor(RP = 100, para = c(10, 0.1))

Quantile distribution function of Pearson type-3 Distribution

Description

Quantile distribution function of Pearson type-3 Distribution

Usage

qpe3(u = NULL, RP = 1/(1 - u), para)

Arguments

u

non-exceedance probability

RP

Return Period "don't use in case u is used"

para

parameters as c(mu, sigma, gamma) that is c(location, scale, shape).

Value

Quantile value/s using the inverse of the cumulative distribution function.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

x <- qpe3(u = 0.99, para = c(1, 1, 0))
x <- qpe3(RP = 100, para = c(1, 1, 0))

Return period function of BrIII distribution

Description

Return period function of BrIII distribution

Usage

tBrIII(x, para = c(1, 2, 0.5))

Arguments

x

quantile/s

para

parameters as c(scale, shape1, shape2)

Value

Return Period/s corresponding to quantile/s.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

RP <- tBrIII(x = 108.4992, para = c(10, 0.25, 0.5))

Return period function of BrXII distribution

Description

Return period function of BrXII distribution

Usage

tBrXII(x, para = c(1, 2, 0.5))

Arguments

x

quantile/s

para

parameters as c(scale, shape1, shape2)

Value

Return Period/s corresponding to quantile/s.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

RP <- tBrXII(x = 108.4992, para = c(10, 0.25, 0.5))

Return period function of Gamma distribution

Description

Return period function of Gamma distribution

Usage

tgam(x, para = c(1.5, 1))

Arguments

x

quantile/s

para

parameters as c(shape, scale)

Value

Return Period/s corresponding to quantile/s.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

RP <- tgam(x = 0.1, para = c(0.1, 0.2))

Return period function of GEV distribution

Description

Return period function of GEV distribution

Usage

tgev(x, para)

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Return Period/s corresponding to quantile/s.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

RP <- tgev(x = 108.4992, para = c(10, 1, 1))

Return period function of Generalized Gamma distribution

Description

Return period function of Generalized Gamma distribution

Usage

tGG(x, para = c(10, 0.25, 0.5))

Arguments

x

quantile/s

para

parameters as c(scale, shape1, shape2)

Value

Return Period/s corresponding to quantile/s.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

RP <- tGG(x = 108.4992, para = c(10, 0.25, 0.5))

Return period function of Generalized Logistic distribution

Description

Return period function of Generalized Logistic distribution

Usage

tglo(x, para = c(10, 1.5, 1))

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Return Period/s corresponding to quantile/s.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

RP <- tglo(x = 0.1, para = c(10, 0.1, 0.2))

Return period function of Generalized Normal distribution

Description

Return period function of Generalized Normal distribution

Usage

tgno(x, para = c(10, 1.5, 1))

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Return Period/s corresponding to quantile/s.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

RP <- tgno(x = 10.1, para = c(10, 0.1, 0.2))

Return period function of Generalized Pareto distribution

Description

Return period function of Generalized Pareto distribution

Usage

tgpa(x, para = c(1, 1, 1))

Arguments

x

quantile/s

para

parameters as c(location, scale, shape)

Value

Return Period/s corresponding to quantile/s.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

RP <- tgpa(x = 1.2, para = c(1, 2, 0.5))

Return period function of Lognormal-3 distribution

Description

Return period function of Lognormal-3 distribution

Usage

tln3(x, para = c(0, 0, 1))

Arguments

x

quantile/s

para

parameters as c(zeta, mu, sigma) that is c(lower bound, mean on log scale, standard deviation on log scale).

Value

Return Period/s corresponding to quantile/s.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

RP <- tln3(x = 12, para = c(0, 0, 1))

Return period function of Noramal distribution

Description

Return period function of Noramal distribution

Usage

tnor(x, para = c(10, 1.5))

Arguments

x

quantile/s

para

parameters as c(location, scale)

Value

Return Period/s corresponding to quantile/s.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

RP <- tnor(x = 11, para = c(10, 1.5))

Return period function of Pearson type-3 distribution

Description

Return period function of Pearson type-3 distribution

Usage

tpe3(x, para = c(10, 1, 1.5))

Arguments

x

quantile/s

para

parameters as c(mu, sigma, gamma) that are c(location, scale, shape).

Value

Return Period/s corresponding to quantile/s.

Author(s)

Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]

Examples

RP <- tpe3(x = 12, para = c(10, 1, 1.5))