if (FALSE)
data(Cascades) # A regional data set
rmom<-regavlmom(Cascades) # Regional average L-moments
# Set up an artificial region to be simulated:
# -- Same number of sites as Cascades
# -- Same record lengths as Cascades
# -- Mean 1 at every site (results do not depend on the site means)
# -- L-CV varies linearly across sites, with mean value equal
# to the regional average L-CV for the Cascades data.
# 'LCVrange' specifies the range of L-CV across the sites.
# -- L-skewness the same at each site, and equal to the regional
# average L-skewness for the Cascades data
nsites <- nrow(Cascades)
means <- rep(1,nsites)
LCVrange <- 0.025
LCVs <- seq(rmom[2]-LCVrange/2, rmom[2]+LCVrange/2, len=nsites)
Lskews<-rep(rmom[3], nsites)
# Each site will have a generalized normal distribution:
# get the parameter values for each site
pp <- t(apply(cbind(means, means*LCVs ,Lskews), 1, pelgno))
# Set correlation between each pair of sites to 0.64, the
# average inter-site correlation for the Cascades data
avcor <- 0.64
# Run the simulation. It will take some time (about 25 sec
# on a Lenovo W500, a moderately fast 2011-vintage laptop)
# Note that the results are consistent with the statement
# "the average H value of simulated regions is 1.08"
# in Hosking and Wallis (1997, p.98).
set.seed(123)
regsimh(qfunc=quagno, para=pp, cor=avcor, nrec=Cascades$n,
nrep=100)
Run the code above in your browser using DataLab