tsEvaPlotReturnLevelsGEV {RtsEva} | R Documentation |
tsEvaPlotReturnLevelsGEV
Description
tsEvaPlotReturnLevelsGEV
is a function that plots the return levels
using the Generalized Extreme Value (GEV) distribution.
Usage
tsEvaPlotReturnLevelsGEV(
epsilon,
sigma,
mu,
epsilonStdErr,
sigmaStdErr,
muStdErr,
rlvmax,
tstamps,
trans,
...
)
Arguments
epsilon |
The shape parameter of the GEV distribution. |
sigma |
The scale parameter of the GEV distribution. |
mu |
The location parameter of the GEV distribution. |
epsilonStdErr |
The standard error of the shape parameter. |
sigmaStdErr |
The standard error of the scale parameter. |
muStdErr |
The standard error of the location parameter. |
rlvmax |
A data frame containing the return levels of annual maxima. |
tstamps |
The title for the plot. |
trans |
The transformation used to fit the EVD, either "ori" (original) or "rev" (reverse). "inv" and "lninv" are also available but in development phase. |
... |
Additional arguments to be passed to the function. |
Value
A ggplot object representing the plot of return levels.
See Also
tsEvaComputeReturnLevelsGEV
tsEvaPlotReturnLevelsGEVFromAnalysisObj
Examples
# Define the required function arguments
epsilon <- 0.2
sigma <- 0.5
mu <- 10
epsilonStdErr <- 0.05
sigmaStdErr <- 0.05
muStdErr <- 0.1
rlvmax <- data.frame(
haz.RP = c(2, 5, 10, 20, 50, 100, 200, 500, 1000),
Idt = as.POSIXct(as.Date("2000-01-01") + round(runif(9, 0, 21 * 365.25)),
origin = "1970-01-01"
),
QNS = c(10, 12, 13, 13.2, 14, 15.7, 16, 16.2, 18)
)
tstamps <- "Example Timestamps"
trans <- "ori"
# Call the function with the defined arguments
result <- tsEvaPlotReturnLevelsGEV(
epsilon, sigma, mu, epsilonStdErr, sigmaStdErr, muStdErr,
rlvmax, tstamps, trans
)
# Plot the result
result