View source: R/Design_Event_2D_Grid.R
Design_Event_2D_Grid | R Documentation |
Calculates the isoline and relative probability of events on the isoline, given the observational data, for one or more user-specified return periods. Outputs the single "most-likely" design event or an ensemble of possible design events obtained by sampling along the isoline according to these relative probabilities. The design event under the assumption of full dependence is also computed. Isoline is derived by calculating annual exceedance probabilities from both copula models on a user-specified grid rather by overlaying the partial isolines from the two copula models as in Design_Event_2D
.
Design_Event_2D_Grid(
Data,
Data_Con1,
Data_Con2,
u1,
u2,
Thres1 = NA,
Thres2 = NA,
N_Both,
Copula_Family1,
Copula_Family2,
Marginal_Dist1,
Marginal_Dist2,
Marginal_Dist1_Par = NA,
Marginal_Dist2_Par = NA,
Con1 = "Rainfall",
Con2 = "OsWL",
GPD1 = NA,
GPD2 = NA,
Rate_Con1 = NA,
Rate_Con2 = NA,
Tab1 = NA,
Tab2 = NA,
mu = 365.25,
GPD_Bayes = FALSE,
Decimal_Place = 2,
Grid_x_min = NA,
Grid_x_max = NA,
Grid_y_min = NA,
Grid_y_max = NA,
Grid_x_interval = NA,
Grid_y_interval = NA,
RP,
Interval = 10000,
End = F,
Resolution = "Low",
x_lab = "Rainfall (mm)",
y_lab = "O-sWL (mNGVD 29)",
x_lim_min = NA,
x_lim_max = NA,
y_lim_min = NA,
y_lim_max = NA,
Isoline_Probs = "Sample",
N = 10^6,
N_Ensemble = 0,
Sim_Max = 10,
Plot_Quantile_Isoline = FALSE
)
Data |
Data frame of dimension |
Data_Con1 |
Data frame containing the conditional sample (declustered excesses paired with concurrent values of other variable), conditioned on the variable in the first column. |
Data_Con2 |
Data frame containing the conditional sample (declustered excesses paired with concurrent values of other variable), conditioned on the variable in the second column. Can be obtained using the |
u1 |
Numeric vector of length one specifying the threshold, expressed as a quantile, above which the variable in the first column was sampled in |
u2 |
Numeric vector of length one specifying the threshold, expressed as a quantile, above which the variable in the second column was sampled in |
Thres1 |
Numeric vector of length one specifying the threshold above which the variable in the first column was sampled in |
Thres2 |
Numeric vector of length one specifying the threshold above which the variable in the second column was sampled in |
N_Both |
Numeric vector of length one specifying the number of data points that feature in both conditional samples. |
Copula_Family1 |
Numeric vector of length one specifying the copula family used to model the |
Copula_Family2 |
Numeric vector of length one specifying the copula family used to model the |
Marginal_Dist1 |
Character vector of length one specifying (non-extreme) distribution used to model the marginal distribution of the non-conditioned variable in |
Marginal_Dist2 |
Character vector of length one specifying (non-extreme) distribution used to model the marginal distribution of the non-conditioned variable in |
Con1 |
Character vector of length one specifying the name of variable in the first column of |
Con2 |
Character vector of length one specifying the name of variable in the second column of |
GPD1 |
Output of |
GPD2 |
Output of |
Rate_Con1 |
Numeric vector of length one specifying the occurrence rate of observations in |
Rate_Con2 |
Numeric vector of length one specifying the occurrence rate of observations in |
Tab1 |
Data frame specifying the return periods of variable |
Tab2 |
Data frame specifying the return periods of variable |
mu |
Numeric vector of length one specifying the (average) occurrence frequency of events in |
GPD_Bayes |
Logical; indicating whether to use a Bayesian approach to estimate GPD parameters. This involves applying a penalty to the likelihood to aid in the stability of the optimization procedure. Default is |
Grid_x_min |
Numeric vector of length one specifying the minimum value of the variable in second column of |
Grid_x_max |
Numeric vector of length one specifying the maximum value of the variable in second column of |
Grid_x_interval |
Numeric vector of length one specifying the resolution of the grid in terms of the variable in first column of |
Grid_y_interval |
Numeric vector of length one specifying the resolution of the grid in terms of the variable in second column of |
RP |
Numeric vector specifying the return periods of interest. |
Interval |
Numeric vector specifying the number of equally spaced points comprising the combined isoline. |
x_lab |
Character vector specifying the x-axis label. |
y_lab |
Character vector specifying the y-axis label. |
x_lim_min |
Numeric vector of length one specifying x-axis minimum. Default is |
x_lim_max |
Numeric vector of length one specifying x-axis maximum. Default is |
y_lim_min |
Numeric vector of length one specifying y-axis minimum. Default is |
y_lim_max |
Numeric vector of length one specifying y-axis maximum. Default is |
N |
Numeric vector of length one specifying the size of the sample from the fitted joint distributions used to estimate the density along an isoline. Samples are collected from the two joint distribution with proportions consistent with the total number of extreme events conditioned on each variable. Default is |
N_Ensemble |
Numeric vector of length one specifying the number of possible design events sampled along the isoline of interest. |
Sim_Max |
Numeric vector of length one specifying the maximum value, given as a multiple of the largest observation of each variable, permitted in the sample used to estimate the (relative) probabilities along the isoline. |
Plot_Quantile_Isoline |
Logical; indicating whether to first plot the quantile isoline. Default is |
Decimal_Palace |
Numeric vector specifying the number of decimal places to which to specify the isoline. Default is |
Isoline_Type |
Character vector of length one specifying the type of isoline. For isolines obtained using the overlaying method in Bender et al. (2016) use |
Plot of all the observations (grey circles) as well as the declustered excesses above Thres1 (blue circles) or Thres2 (blue circles), observations may belong to both conditional samples. Also shown is the isoline associated with RP
contoured according to their relative probability of occurrence on the basis of the sample from the two joint distributions, the "most likely" design event (black diamond), and design event under the assumption of full dependence (black triangle) are also shown in the plot. The function also returns a list comprising the design events assuming full dependence "FullDependence"
, as well as once the dependence between the variables is accounted for the "Most likley" "MostLikelyEvent"
as well as an "Ensemble"
of possible design events and relative probabilities of events on the isoline Contour
. The quantile isolines with Quantile_Isoline_1
and Quantile_Isoline_2
, and GPD thresholds with Threshold_1
and Threshold_2
.
Copula_Threshold_2D
Diag_Non_Con
Diag_Non_Con_Trunc
S22.Rainfall<-Con_Sampling_2D(Data_Detrend=S22.Detrend.df[,-c(1,4)],
Data_Declust=S22.Detrend.Declustered.df[,-c(1,4)],
Con_Variable="Rainfall",u=0.97)
S22.OsWL<-Con_Sampling_2D(Data_Detrend=S22.Detrend.df[,-c(1,4)],
Data_Declust=S22.Detrend.Declustered.df[,-c(1,4)],
Con_Variable="OsWL",u=0.97)
S22.Copula.Rainfall<-Copula_Threshold_2D(Data_Detrend=S22.Detrend.df[,-c(1,4)],
Data_Declust=S22.Detrend.Declustered.df[,-c(1,4)],u1 =0.97,
y_lim_min=-0.075,y_lim_max=0.25,
Upper=c(2,9),Lower=c(2,10),GAP=0.15)$Copula_Family_Var1
S22.Copula.OsWL<-Copula_Threshold_2D(Data_Detrend=S22.Detrend.df[,-c(1,4)],
Data_Declust=S22.Detrend.Declustered.df[,-c(1,4)],u2 =0.97,
y_lim_min=-0.075, y_lim_max =0.25,
Upper=c(2,9),Lower=c(2,10),GAP=0.15)$Copula_Family_Var2
Design.Event<-Design_Event_2D_Grid(Data=S22.Detrend.df[,-c(1,4)],
Data_Con1=S22.Rainfall$Data, Data_Con2=S22.OsWL$Data,
u1=0.97, u2=0.97,
Copula_Family1=S22.Copula.Rainfall, Copula_Family2=S22.Copula.OsWL,
Marginal_Dist1="Logis", Marginal_Dist2="Twe",
RP=c(5,100),Interval=10000,N=10^6,N_Ensemble=10,
Plot_Quantile_Isoline=FALSE)
#Extracting the 100-year isoline from the output
Design.Event$`100`$Isoline
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.