HW.original (data, cod, Nsim=500)
## S3 method for class 'HWorig':
print(x, ...)
## S3 method for class 'HWorig':
plot(x, interactive=TRUE, ...)
LMR (PARA, distr="EXP")
PEL (XMOM, distr="EXP")
SAMLMR (X, A=0, B=0)
SAMLMU (X)
SAMPWM (X, A=0, B=0)
REGLMR (data, cod)
REGTST (data, cod, A=0, B=0, Nsim=500)HWorigcodprintEXP = Exponential (2 parameters: xi, alfa);
GAM = Gamma (2 parameters: alfa, beta);
GEV = Generalized extreme value (3 parameters: xi, alfa, k);
<HW.original returns an object of class HWorig (what the Fortran subroutine REGTST return). LMR calculates the L-moment ratios of a distribution given its parameters.
PEL calculates the parameters of a distribution given its L-moments.
SAMLMR calculates the sample L-moments ratios of a data-set.
SAMLMU calculates the `unbiased' sample L-moments ratios of a data-set.
SAMPWM calculates the sample probability weighted moments of a data-set.
REGLMR calculates regional weighted averages of the sample L-moments ratios.
REGTST calculates statistics useful in regional frequency analysis.
1) Discordancy measure, d(i), for individual sites in a region.
Large values might be used as a flag to indicate potential errors
in the data at the site. "large" might be 3 for regions with 15
or more sites, but less (exact values in array dc1) for smaller
regions.
2) Heterogeneity measures, H(j), for a region based upon either:-
j=1: the weighted s.d. of the l-cvs or
j=2: the average distance from the site to the regional average
on a graph of l-cv vs. l-skewness
j=3: the average distance from the site to the regional average
on a graph of l-skewness vs. l-kurtosis.
In practice H(1) is probably sufficient. a value greater than
(say) 1.0 suggests that further subdivision of the region should
be considered as it might improve quantile estimates.
3) Goodness-of-fit measures, Z(k), for 5 candidate distributions:
k=1: generalized logistic
k=2: generalized extreme value
k=3: generalized normal (lognormal)
k=4: pearson type iii (3-parameter gamma)
k=5: generalized pareto.
Provided that the region is acceptably close to homogeneous,
the fit may be judged acceptable at 10 if Z(k) is less than 1.645 in absolute value.
For further details see Hosking and Wallis (1997), "Regional frequency analysis: an approach based on L-moments", cambridge university press, chapters 3-5.
Differences among HW.original and HW.tests should depend on differences among PEL and par.kappa for the kappa distribution.
A numerical algorithm is used to resolve the implicit Equations (A.99) and (A.100) in Hosking and Wallis (1997, pag. 203-204).
The algorithms in PEL and par.kappa are different.
Anyway the risults of the tests should converge asymptotically.
Hosking, J.R.M. and Wallis, J.R. (1997) Regional Frequency Analysis: an approach based on L-moments, Cambridge University Press, Cambridge, UK.
HW.tests.data(hydroSIMN)
annualflows
summary(annualflows)
x <- annualflows["dato"][,]
cod <- annualflows["cod"][,]
split(x,cod)
HW.original(x,cod)
fac <- factor(annualflows["cod"][,],levels=c(34:38))
x2 <- annualflows[!is.na(fac),"dato"]
cod2 <- annualflows[!is.na(fac),"cod"]
HW.original(x2,cod2)
plot(HW.original(x2,cod2))Run the code above in your browser using DataLab