Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

SimData

Data simulator


Description

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

Usage

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

Arguments

n

sample size to be simulated

pars

vector of parameters in the order of location, scale, shape

dist

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

GF

vector of GF inputs in the order of Lcv, LSkew, QMED

Details

The simulated sample can be generated using distribution parameters, or the growth factor (GF) inputs; linear coefficient of variationn (Lcv), linear skewness (LSkew) & the median annual maximum (QMED).

Value

A random sample of size n for the chosen distribution.

Author(s)

Anthony Hammond

Examples

#Get an annual maximum sample, estimate the parameters and simulate a sample of
#size 30 the parameters using Lmoments (with GenLog)
AM.27090 <- GetAM(27090)
GenLogPars(AM.27090$Flow)
SimData(30, pars = c(298.6416, 51.37096, -0.04211332), dist = "GenLog")
#calculate the Lmoments and simulate a sample of 30 with GF inputs
Lmoms(AM.27090$Flow)
SimData(30, GF = c(0.1704826, 0.04211332, median(AM.27090$Flow)), dist = "GenLog")

UKFE

UK Flood Estimation

v0.1.6
GPL-3
Authors
Anthony Hammond
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.