tsEvaComputeTimeRP {RtsEva}R Documentation

tsEvaComputeTimeRP

Description

tsEvaComputeTimeRPis a function that calculates the return period of a given event for GEV and GPD distributions at a given time index.

Usage

tsEvaComputeTimeRP(params, RPiGEV, RPiGPD)

Arguments

params

A data frame containing the following parameters:

epsilonGEV

Shape parameter for the Generalized Extreme Value (GEV) distribution.

muGEV

Location parameter for the GEV distribution.

sigmaGEV

Scale parameter for the GEV distribution.

epsilonGPD

Shape parameter for the Generalized Pareto (GPD) distribution.

thresholdGPD

Threshold parameter for the GPD distribution.

sigmaGPD

Scale parameter for the GPD distribution.

nPeaks

Number of peaks in the sample time horizon.

SampleTimeHorizon

Total number of years in the data sample.

RPiGEV

Value of RP for the GEV distribution.

RPiGPD

Value of RP for the GPD distribution.

Value

A vector with the calculated return period for GEV and GPD distributions.

Examples

#Parameter vector:
params <- t(data.frame(epsilonGEV = 0.2, muGEV = 3, sigmaGEV = 1,
                  epsilonGPD = 0.2, thresholdGPD = 3, sigmaGPD = 1,
                  nPeaks = 70, SampleTimeHorizon = 70))

tsEvaComputeTimeRP(params, RPiGEV = 10, RPiGPD = 10)

[Package RtsEva version 1.0.0 Index]