GOFmeasures: Goodness of fit measures

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/HydroGOF.R

Description

The main function to compute the Hosking and Wallis (1997) and Kjeldsen and Prosdocimi (2014) goodness of fit measures.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
GOFmeasures(
  stations = NULL,
  lmom = NULL,
  n.amax = NULL,
  Nsim = 500,
  mcmom = NULL,
  type = c("HW_GOF", "KP_GOF"),
  plot = FALSE,
  conf.lev = 0.9,
  dist.type = "mahalanobis",
  ...
)

Arguments

stations

a list of amax, with one list components per station (see Details)

lmom

the matrix of sample lmoments: each line corresponds to the lmoments of for each station (see Details)

n.amax

a vector with the length of years recorded in each station (see Details)

Nsim

the number of simulations used in the creation of mcmom, if mcmom is left null.

mcmom

an (Nsim*4) Matrix containing regional average L-moments (l1,l2,t3,t4) for the Nsim MC generated homogeneous regions. By default this is left NULL and the mcmom matrix is computed.

type

indicates which GOF measure should be calculated, default is both "HW" and "KP"

plot

logical vector indicating if the lmoment diagram with the ellipses intersecting the theoretical lines should be displayed

conf.lev

confidence level (1-alpha). If for a given distribution the distance between the bias-corrected tR vector and the theoretical L-skewness and L-kurtosis line is bigger than the qchisq(1-alpha, 2) value the distribution is not considered as an acceptable distribution.

dist.type

the type of distance to be used in the Kjeldsen and Prosdocimi measure to determine the distance between the bias-corrected regional parameters and the theoretical L-skewness and L-kurtosis line, default set to "mahalanobis", the other option ("geometric") computes the simple geometric distance

...

arguments to pass to mahalanobis

Details

The function can take information on the annual maxima information either as a list of stations in stations or as the summarised lmom matrix (lmom) and information of the length of each series (n.amax).

Value

An object of the GOFmeas class.

GOFtable

a table with the Goodness of fit results

selectedDist

the selected distribution which minimises the goodness of fit measures calculated

mcmom

the (Nsim*4) mcmom matrix of sample lmoments from the MCgenerated homogeneous region. The matrix can be reused if needed

lmom

the matrix of sample lmoments for the region under study

rmom

the weighted average regional lmoment. Weights are given according to the length of sample at each station

n.amax

a vector with the number of years recorded in each station

Author(s)

Thomas Kjeldsen and Ilaria Prosdocimi

References

Hosking, J. R. M., and J. R. Wallis (1997), Regional frequency analysis: an approach based on L-moments, Cambridge University Press.

Kjeldsen T. R. and Prosdocimi I. (2015) A bivariate extension of the Hosking and Wallis goodness-of-fit measure for regional distributions. Water Resources Research. DOI: 10.1002/2014WR015912

See Also

print.GOFmeas summary.GOFmeas

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
set.seed(546)
# generate a region with (mostly) GEV distribution
library(lmom)
stats <- list(quagev(runif(30,0,1),c(289, 45 ,-0.22)),
              quagev(runif(45,0,1),c(189, 40 ,-0.15)),
              quagev(runif(25,0,1),c(122, 10 ,-0.24)),
              quagev(runif(43,0,1),c( 59,  8 ,-0.18)),
              quagev(runif(32,0,1),c( 62, 10 ,-0.21)),
              quagev(runif(28,0,1),c( 91,  9 ,-0.25)),
              quaglo(runif(27,0,1),c(202, 25 ,-0.17)))
tt <- GOFmeasures(stats)
tt
summary(tt)

ilapros/GOFmeas documentation built on July 19, 2020, 9:43 p.m.