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:

annualMax

A vector of annual maximum values

annualMaxDate

A vector of dates corresponding to the annual maximum values

monthlyMax

A matrix of monthly maximum values

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:

EVmeta

A list containing metadata about the analysis. It includes Tr, A vector of return periods for which return levels are calculated

EVdata

A list containing the calculated statistics and return levels. It includes the following components:

GEVstat

A list containing the GEV statistics and return levels:

method

The method used for fitting the GEV distribution.

values

A vector of return levels calculated using the GEV distribution.

parameters

A vector of parameter estimates for the GEV distribution.

paramCIs

A matrix of confidence intervals for the parameter estimates.

GPDstat

list containing the GPD statistics and return levels:

method

The method used for fitting the GPD distribution

values

A vector of return levels calculated using the GPD distribution

parameters

A vector of parameter estimates for the GPD distribution

paramCIs

A matrix of confidence intervals for the parameter estimates

isValid

A 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

[Package RtsEva version 1.0.0 Index]