gev.d.rl2.Rd 1.46 KB
 Jana Ulrich committed Jul 17, 2019 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 % Generated by roxygen2: do not edit by hand % Please edit documentation in R/gevdfit.R \name{gev.d.rl2} \alias{gev.d.rl2} \title{Calculate Returnlevel with standart deviation (through delta method)} \usage{ gev.d.rl2(p, fit, ds, ydat, sd = FALSE) } \arguments{ \item{p}{single numeric value containing the non-exceedance probability p=1-1/T} \item{fit}{\code{\link{gev.d.fit}} object} \item{ds}{numeric vector of durations for which to calculate the return levels} \item{ydat}{matrix containing the covariates in the same order as used in \code{\link{gev.d.fit}}} \item{sd}{logical, if TRUE, standart deviation of the returnlevels obtained with the delta method are also returned} } \value{ either vector or matrix containing the p-quantile or list containing both the p-quantile and its standart deviation for durations in ds (and different rows for the covariates in ydat) } \description{ calculate returnlevel for chosen duration and return period for \code{\link{gev.d.fit}} objects } \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 100 year (p=0.99) rl for a duration of d=24 hours rl <- gev.d.rl2(p = 0.99,fit = fit,ds = 1:30,ydat = matrix(0.7,1,2),sd=TRUE) plot(1:30,rl$q,log='xy',type = 'l',xlab = 'Duration',ylab = 'Intensity',ylim = c(5,100)) # add 0.95-confidence intervals lines(1:30,rl$q-1.96*rl$sd,lty=2) lines(1:30,rl$q+1.96*rl\$sd,lty=2) }