Skip to contents

Simulation of a random sample from the generalised extreme value, generalised logistic, Gumbel, Kappa3, or generalised Pareto distributions

Usage

SimData(n, pars = NULL, dist = "GenLog", GF = NULL)

Arguments

n

sample size to be simulated

pars

vector of parameters in the order of location, scale, shape (only location and shape for Gumbel)

dist

choice of distribution. Either "GEV", "GenLog", "Gumbel", "Kappa3", or "GenPareto"

GF

vector of GF inputs in the order of Lcv, LSkew, QMED (only Lcv and QMED if dist = "Gumbel")

Value

A random sample of size n for the chosen distribution.

Details

The simulated sample can be generated using the distribution parameters (pars) location, scale and shape, or the growth factor (GF) inputs linear coefficient of variation (Lcv), linear skewness (LSkew) & median annual maximum (QMED). This function applies a probability distribution model which assumes that the sample data is independent and identical, i.e. the assumption is that all observations in the sample would not impact or depend on any other. Furthermore, all observations are from the same underlying process which has not changed over the period of record (stationarity).

Author

Anthony Hammond

Examples

# Simulate a sample of size 30 from a GenLog distribution with parameters 299, 51, -0.042
SimData(30, pars = c(299, 51, -0.042), dist = "GenLog")
#>  [1] 443.9286 152.2710 380.3100 619.4250 277.3214 570.7474 276.9093 263.4864
#>  [9] 180.8823 286.4340 246.8887 113.0226 194.9866 354.7187 251.7348 269.5243
#> [17] 326.8955 250.8316 386.5673 240.1456 133.6118 254.8549 344.4057 286.4478
#> [25] 320.5009 349.9241 290.7441 339.5093 287.1023 207.8723

# Now simulate using the Lcv, Lskew, and median (0.17, 0.04, 310)
SimData(30, GF = c(0.17, 0.04, 310), dist = "GenLog")
#>  [1] 245.1162 385.9882 336.1956 295.9136 280.2181 327.4061 243.7209 209.9645
#>  [9] 324.7183 122.6175 144.3386 321.5790 243.7909 336.7041 259.8350 244.6306
#> [17] 683.7446 381.4618 228.5849 430.7121 193.2319 380.4978 326.7544 309.7836
#> [25] 245.7217 513.6037 313.1556 278.8411 329.2257 329.2030