tsEvaComputeReturnLevelsGPDFromAnalysisObj {RtsEva} | R Documentation |
tsEvaComputeReturnLevelsGPDFromAnalysisObj
Description
tsEvaComputeReturnLevelsGPDFromAnalysisObj
is a function that calculates the return levels for a Generalized Pareto Distribution (GPD) using the parameters obtained from an analysis object. It takes into account non-stationarity by considering time-varying parameters and their associated standard errors.
Usage
tsEvaComputeReturnLevelsGPDFromAnalysisObj(
nonStationaryEvaParams,
returnPeriodsInYears,
timeIndex = -1
)
Arguments
nonStationaryEvaParams |
The non-stationary parameters obtained from the analysis object. |
returnPeriodsInYears |
The return periods for which to compute the return levels, expressed in years. |
timeIndex |
Temporal index corresponding to the time step on which compute the GEV RLs. |
Value
A list with the following components:
returnLevels
A vector of return levels corresponding to the specified return periods.
returnLevelsErrFit
A vector of standard errors for the return levels estimated based on the fit.
returnLevelsErrTransf
A vector of standard errors for the return levels estimated based on the transformed parameters.
See Also
Examples
# Example usage with some sample data
nonStationaryEvaParams <- list(NA,list(
parameters = list(
epsilon = 0.1,
sigma = c(2.1, 2.2, 2.3),
threshold = c(1.1, 1.2, 1.3),
timeHorizonStart=as.POSIXct("1951-01-01"),
timeHorizonEnd=as.POSIXct("2020-12-31"),
nPeaks=90
),
paramErr = list(
epsilonErr = 0.01,
sigmaErr = c(0.11, 0.12, 0.13),
thresholdErr = c(0.011, 0.012, 0.013)
)
)
)
returnPeriodsInYears <- c(1, 5, 10, 20, 50)
timeIndex=1
results <- tsEvaComputeReturnLevelsGPDFromAnalysisObj(nonStationaryEvaParams, returnPeriodsInYears)
head(results$returnLevels)