rgev.d | R Documentation |
Generation of random variables following duration-dependent GEV.
rgev.d(n, mut, sigma0, xi, theta, eta, d, tau = 0, eta2 = 0)
n |
number of random variables per duration |
mut, sigma0, xi |
numeric value, giving modified location, modified scale and shape parameter |
theta |
numeric value, giving duration offset (defining curvature of the IDF curve) |
eta |
numeric value, giving duration exponent (defining slope of the IDF curve) |
d |
positive numeric value, giving duration |
tau |
numeric value, giving intensity offset τ (defining flattening of the IDF curve). Default: τ=0. |
eta2 |
numeric value, giving a second duration exponent η_{2} (needed for multiscaling). Default: η_2=0. |
For details on the d-GEV and the parameter definitions, see IDF-package
list containing vectors of random variables. The first element of the list are the random values for the first given duration etc. Note that the random variables for different durations are nor ordered (contrary to precipitation maxima of different durations).
pgev.d
, qgev.d
, dgev.d
# random sample for one duration rgev.d(n=100,mut=4,sigma0=2,xi=0,theta=0.1,eta=0.3,d=1) # compare randomn samples for different durations ds <- c(1,4) samp <- lapply(ds,rgev.d,n=100,mut=4,sigma0=2,xi=0,theta=0.1,eta=0.3) hist(samp[[1]],breaks = 10,col=rgb(1,0,0,0.5),freq = FALSE ,ylim=c(0,0.3),xlim=c(3,20),xlab='x',main = 'Random d-GEV samples') hist(samp[[2]],breaks = 10,add=TRUE,col=rgb(0,0,1,0.5),freq = FALSE) legend('topright',fill = c(rgb(1,0,0,0.5),rgb(0,0,1,0.5)), legend = paste('d=',1:2,'h'),title = 'Duration')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.