gev.d.rl.Rd 1.36 KB
Newer Older
1
2
3
4
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gevdfit.R
\name{gev.d.rl}
\alias{gev.d.rl}
Jana Ulrich's avatar
Jana Ulrich committed
5
\title{Calculate Returnlevel}
6
7
8
9
10
11
12
13
14
15
16
17
\usage{
gev.d.rl(params, p.d)
}
\arguments{
\item{params}{list of parameters mu_tilde, sigma0, xi, theta, eta (single values and/or compatible matrices)
as obtained from \code{\link{gev.d.fit}} or \code{\link{gev.d.params}}}

\item{p.d}{numeric vector of length 2 containing one value the for exeedance probability p = 1-1/RP 
and one value for the duration at which to calculate the return level}
}
\value{
one return level value or matrix with return levels (depending on input to params)
18
unit: e.g. mm/h
19
20
}
\description{
Jana Ulrich's avatar
Jana Ulrich committed
21
calculate Returnlevel for chosen duration and return period 
22
23
24
25
26
27
28
from \code{\link{gev.d.fit}} parameters
}
\examples{
data('example',package = 'IDF')
fit <- gev.d.fit(example$dat,example$d,ydat = as.matrix(example[,c("cov1","cov2")])
                 ,mul = c(1,2),sigl = 1)
### calculate rl on grid:
29
30
31
# covariates values
cov1 <- rep(seq(-1,1,0.1),11)
cov2 <- rep(seq(0,1,0.1),each=21)
32
# calculate parameters of d-gev on grid, based on output of gev.d.fit
33
par <- gev.d.params(fit = fit,ydat = cbind(cov1,cov2))
34
35
# calculate 100 year (p=0.99) rl for a duration of d=24 hours
rl <- gev.d.rl(params = par,p.d = c(0.99,24))
36
37
dim(rl) <- c(21,11)
# rl map:
38
39
image(x=seq(-1,1,0.1),y=seq(0,1,0.1),z=rl,xlab = 'cov1', ylab = 'cov2')
}