Commit 047bc0d7 by Jana Ulrich

worked on description (IDF-package) + references + equations. Still need to...

worked on description (IDF-package) + references + equations. Still need to change parameter names in gev.d.diag, gev.d.fit, ged.d.params, gev.d.nll (tomorrow)
parent 8415f671
 # This file contains the functions: # This file contains: # -IDF-package description # -IDF.agg for preparing the data # -IDF.plot for plotting of IDF curves at a chosen station #### IDF-package #### #' Introduction #' @name IDF-package #' @docType package #' @description This package provides functions to estimate IDF relations for given #' precipitation time series on the basis of a duration-dependent #' generalized extreme value distribution (d-GEV). #' The central function is \code{\link{gev.d.fit}}, which uses the method #' of maximum-likelihood estimation for the d-GEV parameters, whereby it is #' possible to include generalized linear modeling #' for each parameter. This function was implemented on the basis of \code{\link[ismev]{gev.fit}}. #' For more detailed information on the methods and the application of the package for estimating #' IDF curves with spatial covariates, see Ulrich et. al (2020). #' @details #' * The __d-GEV__ is defined following Koutsoyannis et al. (1998): #' \deqn{G(x)= \exp[-( 1+\xi(x/\sigma(d)- \tilde{\mu}) ) ^{-1/\xi}] } #' defined on \eqn{ \{ x: 1+\xi(x/\sigma(d)- \tilde{\mu} > 0) \} }, #' with the duration dependent scale parameter \eqn{\sigma(d)=\sigma_0/(d+\theta)^\eta > 0}, #' modified location parameter \eqn{\tilde{\mu}=\mu/\sigma(d)\in R} #' and shape parameter \eqn{\xi\in R}, \eqn{\xi\neq 0}. #' The parameters \eqn{\theta \leq 0} and \eqn{0<\eta<1} are duration offset and duration exponent #' and describe the slope and curvature in the resulting IDF curves, respectively. #' * A useful introduction to __Maximum Likelihood Estimation__ for fitting for the #' generalized extreme value distribution (GEV) is provided by Coles (2001). It should be noted, however, that this method uses #' the assumption that block maxima (of different durations or stations) are independent of each other. #' @references #' * Ulrich, J.; Jurado, O.E.; Peter, M.; Scheibel, M.; #' Rust, H.W. Estimating IDF Curves Consistently over Durations with Spatial Covariates. Water 2020, 12, 3119, #' https://doi.org/10.3390/w12113119 #' * Demetris Koutsoyiannis, Demosthenes Kozonis, Alexandros Manetas, #' A mathematical framework for studying rainfall intensity-duration-frequency relationships, #' Journal of Hydrology, #' Volume 206, Issues 1–2,1998,Pages 118-135,ISSN 0022-1694, https://doi.org/10.1016/S0022-1694(98)00097-3 #' * Coles, S.An Introduction to Statistical Modeling of Extreme Values; Springer: New York, NY, USA, 2001, #' https://doi.org/10.1198/tech.2002.s73 #' @md NULL #### IDF.agg #### #' Aggregation and annual maxima for chosen durations ... ... @@ -105,7 +145,7 @@ #' #' @param durations vector of durations for which to calculate the quantiles. #' @param fitparams vector containing parameters mut, sigma0, xi, theta, eta #' (modified location, scale, shape, duration offset, duration exponent) for chosen station #' (modified location, scale offset, shape, duration offset, duration exponent) for chosen station #' as obtained from \code{\link{gev.d.fit}} #' (or \code{\link{gev.d.params}} for model with covariates). #' @param probs vector of exeedance probabilities for which to plot IDF curves (p = 1-1/ReturnPeriod) ... ...
 ... ... @@ -496,23 +496,26 @@ gev.d.params <- function(fit,ydat){ #### example data #### #' Sampled data for duration dependent GEV #' Sampled data for duration-dependent GEV #' #' A dataset containing: #' @description #' Randomly sampled data set used for running the example code, containing: #' \itemize{ #' \item \code{$xdat}: 'annual' maxima values #' \item \code{$ds}: corresponding durations #' \item \code{$cov1}, \code{$cov2}: covariates} #' GEV parameters: #' d-GEV parameters used for sampling: #' \itemize{ #' \item mu = 4 + 0.2*cov1 +0.5*cov2 #' \item sigma = 2+0.5*cov1 #' \item xi = 0.5 #' \item theta = 0 #' \item eta = 0.5} #' \item \eqn{\tilde{\mu} = 4 + 0.2 cov_1 +0.5 cov_2} #' \item \eqn{\sigma_0 = 2+0.5 cov_1} #' \item \eqn{\xi = 0.5} #' \item \eqn{\theta = 0} #' \item \eqn{\eta = 0.5}} #' #' #' @docType data #' @keywords datasets #' @name example #' @usage data('example',package ='IDF') #' @format A data frame with 330 rows and 4 variables NULL
 ... ... @@ -3,22 +3,25 @@ \docType{data} \name{example} \alias{example} \title{Sampled data for duration dependent GEV} \title{Sampled data for duration-dependent GEV} \format{ A data frame with 330 rows and 4 variables } \usage{ data('example',package ='IDF') } \description{ A dataset containing: Randomly sampled data set used for running the example code, containing: \itemize{ \item \code{$xdat}: 'annual' maxima values \item \code{$ds}: corresponding durations \item \code{$cov1}, \code{$cov2}: covariates} GEV parameters: d-GEV parameters used for sampling: \itemize{ \item mu = 4 + 0.2*cov1 +0.5*cov2 \item sigma = 2+0.5*cov1 \item xi = 0.5 \item theta = 0 \item eta = 0.5} \item \eqn{\tilde{\mu} = 4 + 0.2 cov_1 +0.5 cov_2} \item \eqn{\sigma_0 = 2+0.5 cov_1} \item \eqn{\xi = 0.5} \item \eqn{\theta = 0} \item \eqn{\eta = 0.5}} } \keyword{datasets}