R/tgpa.R

Defines functions tgpa

Documented in tgpa

#' Return period function of Generalized Pareto distribution
#'
#' @param x quantile/s
#' @param para parameters as c(location, scale, shape)
#'
#' @return Return Period/s corresponding to quantile/s.
#' @author Mohanad Zaghloul [aut, cre], Simon Michael Papalexiou [aut, ths], Amin Elshorbagy [aut, ths]
#' @export
#' @importFrom lmom cdfgpa
#'
#' @examples
#' 
#' RP <- tgpa(x = 1.2, para = c(1, 2, 0.5))
#' 
tgpa <- function(x, para = c(1, 1, 1)){
  u <- cdfgpa(x , para)
  RP <- 1/(1 - u)
  return(RP)
}

Try the LMoFit package in your browser

Any scripts or data that you put into this service are public.

LMoFit documentation built on May 29, 2024, 9:15 a.m.