tsEvaComputeReturnLevelsGPD {RtsEva} | R Documentation |
tsEvaComputeReturnLevelsGPD
Description
#' tsEvaComputeReturnLevelsGPD
is a function that
compute the return levels for a Generalized Pareto Distribution (GPD)
using the parameters of the distribution and their standard errors.
Usage
tsEvaComputeReturnLevelsGPD(
epsilon,
sigma,
threshold,
epsilonStdErr,
sigmaStdErr,
thresholdStdErr,
nPeaks,
sampleTimeHorizon,
returnPeriods
)
Arguments
epsilon |
The shape parameter of the GPD. |
sigma |
The scale parameter of the GPD. |
threshold |
The threshold parameter of the GPD. |
epsilonStdErr |
The standard error of the shape parameter. |
sigmaStdErr |
The standard error of the scale parameter. |
thresholdStdErr |
The standard error of the threshold parameter. |
nPeaks |
The number of peaks used to estimate the parameters. |
sampleTimeHorizon |
The time horizon of the sample in the same units as the return periods (e.g., years). |
returnPeriods |
The return periods for which to compute the return levels. |
Details
sampleTimeHorizon and returnPeriods must be in the same units, e.g. years
Value
A list containing the following components:
returnLevels
A vector of return levels corresponding to the specified return periods.
returnLevelsErr
A vector of standard errors for the return levels.
Examples
# Example usage with some sample data
epsilon <- c(0.1)
sigma <- c(2.3)
threshold <- c(1.3)
epsilonStdErr <- c(0.01)
sigmaStdErr <- c(0.11)
thresholdStdErr <- c(0.011)
returnPeriodsInDts <- c( 5, 10, 20, 50)
nPeaks=70
SampleTimeHorizon=70
results <- tsEvaComputeReturnLevelsGPD(epsilon, sigma, threshold, epsilonStdErr,
sigmaStdErr, thresholdStdErr, nPeaks, SampleTimeHorizon, returnPeriodsInDts)
head(results$returnLevels)
head(results$returnLevelsErr)