View source: R/GPD_Threshold_Solari_Sel.R
GPD_Threshold_Solari_Sel | R Documentation |
A nonparametric bootstrapping procedure is undertaken to assess the uncertainty in the GPD parameters and associated return levels for a GPD fit to observations above a user specified threshold. The estimates are compared with those obtained at other thresholds by running the GPD_Threshold_Solari
function beforehand, and using its output as an input of this function. The code is based on the AUTOMATICO_MLE_BOOT
function provided by Sebastian Solari.
GPD_Threshold_Solari_Sel(
Event,
Data,
Solari_Output,
Thres,
Alpha = 0.1,
N_Sim = 10^4,
RP_Min = 1,
RP_Max = 1000,
RP_Plot = 100,
mu = 365.25,
y_lab = "Data"
)
Event |
Numeric vector containing independent events declustered using a moving window approach. |
Data |
Original time series. Dataframe containing two columns. In column:
|
Solari_Output |
Output of the |
Thres |
Numeric vector of length one specifying the threshold to analyze, chosen by the user based on plots from the |
Alpha |
Numeric vector of length one specifying the level of confidence associated with the confidence interval i.e., the probability that the interval contains the true value of the parameter is |
N_Sim |
Numeric vector of length one specifying the number of bootstrap samples. Default is |
RP_Min |
Numeric vector of length one specifying the minimum return level to be calculated. Default is |
RP_Max |
Numeric vector of length one specifying the maximum return level to be calculated. Default is |
RP_Plot |
Numeric vector of length one specifying the return level in the lower right plot. Default is |
mu |
(average) occurrence frequency of events in the original time series |
y_lab |
Character vector specifying the y-axis label of the return level plot. |
List containing three objects: Estimate
, CI_Upper
and CI_Lower
. The Estimate
dataframe comprises
xi
GPD shape parameter estimate for the threshold is Thres
.
sigma
GPD scale parameter estimate for the threshold is Thres
.
Thres
GPD location parameter estimate for the threshold is Thres
.
rate
GPD rate parameter i.e., number of independent excesses per year for a threshold of Thres
.
The remaining columns are RL
Return level estimates from the GPD using a threshold of Thres
.
CI_Upper
and CI_Lower
give the upper and lower bounds of the 100(1-\frac{Alpha}{2})\%
confidence interval for the corresponding element in Estimate
.
Top row: Histograms of the GPD parameter estimates based on a nonparametric bootstrapping simulation. Grey bars correspond to the estimates obtained as the threshold (Thres
) is varied, found by running the function a necessary input of the function. Continuous black lines correspond to results obtained by fixing the threshold at Thres
. Dashed blue lines correspond to the expected values for the fixed threshold.
Lower left: Return level plot. Return levels of the observations estimated from the empirical distribution. Grey bars correspond to the maximum of the upper and lower bounds of the 100(1-\frac{Alpha}{2})\%
confidence intervals as the threshold is varied. Continuous black lines correspond to results obtained by fixing the threshold at Thres
. Dashed blue lines correspond to the expected values for the fixed threshold.
Lower right: As in the top row but for the 100 years return period quantile.
Rainfall_Declust_SW<-Decluster_SW(Data=S22.Detrend.df[,c(1:2)],Window_Width=7)
Finding an appropriate threshold for the declustered series
S22_OsWL_Solari<-GPD_Threshold_Solari(Event=Rainfall_Declust_SW$Declustered,
Data=na.omit(S22.Detrend.df[,2]))
S22_OsWL_Solari<-GPD_Threshold_Solari_Sel(Event=Rainfall_Declust_SW$Declustered,
Data=na.omit(S22.Detrend.df[,2]),
Thres=S22_OsWL_Solari$Candidate_Threshold)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.