| tsEVstatistics {RtsEva} | R Documentation |
tsEVstatistics
Description
tsEvstatistics is a function that calculates the Generalized Extreme
Value (GEV) and Generalized Pareto Distribution (GPD) statistics
and return levels for a given dataset of extreme values.
Usage
tsEVstatistics(
pointData,
alphaCI = 0.95,
gevMaxima = "annual",
gevType = "GEV",
evdType = c("GEV", "GPD"),
shape_bnd = c(-0.5, 1)
)
Arguments
pointData |
A list containing the dataset of extreme values. It should include the following components:
|
alphaCI |
The confidence level for the confidence intervals of the parameter estimates. Default is 0.95. |
gevMaxima |
The type of maxima to use for GEV fitting. Can be either 'annual' or 'monthly'. Default is 'annual'. |
gevType |
The type of GEV distribution to use. Can be either 'GEV', 'Gumbel'. Default is 'GEV'. |
evdType |
The types of extreme value distributions to calculate. Can be a combination of 'GEV' and 'GPD'. Default is c('GEV', 'GPD'). |
shape_bnd |
The lower and upper bounds for the shape parameter of the GEV distribution. Default is c(-0.5, 1). |
Value
A list containing the following components:
EVmetaA list containing metadata about the analysis. It includes Tr, A vector of return periods for which return levels are calculated
EVdataA list containing the calculated statistics and return levels. It includes the following components:
GEVstatA list containing the GEV statistics and return levels:
methodThe method used for fitting the GEV distribution.
valuesA vector of return levels calculated using the GEV distribution.
parametersA vector of parameter estimates for the GEV distribution.
paramCIsA matrix of confidence intervals for the parameter estimates.
GPDstatlist containing the GPD statistics and return levels:
methodThe method used for fitting the GPD distribution
valuesA vector of return levels calculated using the GPD distribution
parametersA vector of parameter estimates for the GPD distribution
paramCIsA matrix of confidence intervals for the parameter estimates
isValidA logical value indicating whether the analysis was performed or not.
Examples
# Create a sample dataset
data <- ArdecheStMartin
colnames(data) <- c("Date", "Value")
yrs <- as.integer(format(data$Date, "%Y"))
tokeep <- which(yrs>=2015)
data <- data[tokeep,]
pointData <- tsEvaSampleData(data, meanEventsPerYear=3, minEventsPerYear=0,
minPeakDistanceInDays=7, "high")
result <- tsEVstatistics(pointData)
result$EVdata$GEVstat$values
result$EVdata$GPDstat$values