View source: R/Conditional_RP_2D_Equal.R
Conditional_RP_2D_Equal | R Documentation |
A large number of realizations are simulated from the copulas fit to the conditioned samples, in proportion with the sizes of the conditional samples. The realization are transformed to the original scale and the relevant probabilities estimated empirically. The conditional probabilities return period of the conditioning variable equals
Conditional_RP_2D_Equal(
Data,
Data_Con1,
Data_Con2,
u1,
u2,
Thres1 = NA,
Thres2 = NA,
Copula_Family1,
Copula_Family2,
Marginal_Dist1,
Marginal_Dist2,
Con1 = "Rainfall",
Con2 = "OsWL",
mu = 365.25,
Con_Var,
RP_Con,
RP_Non_Con,
Width = 0.1,
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,
DecP = 2,
N
)
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 (quantile) threshold above which the variable in the first column was sampled in |
u2 |
Numeric vector of length one specifying the (quantile) threshold 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 |
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 |
mu |
Numeric vector of length one specifying the (average) occurrence frequency of events in |
Con_Var |
Character vector of length one specifying the (column) name of the conditioning variable. |
RP_Con |
Numeric vector of length one specifying the return period of the conditioning variable |
RP_Non_Con |
Numeric vector of length one specifying the return period of the non-conditioning variable. |
Width |
Numeric vector of length one specifying the distance above and below the |
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 |
DecP |
Numeric vector of length one specifying the number of decimal places to round the data in the conditional samples to in order to identify observations in both conditional samples. 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 |
Console output:
Con_Var Name of the conditioning variable
RP_Var1
Return period of variable Con1 i.e., variable in second column of Data
RP_Var2
Return period of variable Con2 i.e., variable in third column of Data
Var1 Value of Con1 at the return period of interest
Var2 Value of Con2 at the return period of interest
RP_Full_Dependence Joint return period of the (Var1,Var2) event under full dependence
RP_Independence Joint return period of the (Var1,Var2) event under independence
RP_Copula Joint return period of the (Var1,Var2) event according to the two sided conditional sampling - copula theory approach
Prob
Probability associated with RP_Copula
N_Sub_Sample
Number of realizations of the Con_Var
within +/- width of the value of Con_Var
with return period .
Non_Con_Var_X Values of the non-conditioned variable of the (conditional) Cummulative Distribution Function (CDF) i.e. x-axis of bottom left plot
Con_Prob
Con_Prob
CDF of the non-conditioned variable given the return period of Con_Var
equals RP_Con
Con_Prob_Est
Probability the non-conditioned variable is less than or equal to RP_Non_Con
given the return period of Con_Var
equals RP_Con
Graphical output:
Top Left: Sample conditioned on rainfall (red crosses) and O-sWL (blue circles). Black dot is the event with a marginal return period of the conditioned variable Var_Con
and non-conditioned variable equal to RP_Con
and RP_Non_Con
, respectively. The joint return period of the event using the conditional sampling - copula theory approach and under the assumptions of full dependence and independence between the variables are printed.
Top Right: Sample used to estimate the joint return period of the event of interest. Black dots denote the N_Excess
sized subset of the sample where the marginal return period of the conditioned variable Var_Con
exceeds RP_Con
(years). The subset is used to estimate the conditional probabilities in part two of the question.
Bottom Left: Conditional Cumulative Distribution Function (CDF) of the non-conditioned variable given the marginal return period of the conditioned variable Var_Con
exceeds RP_Con
years i.e. the black dots in the top right plot.
Bottom Right: Conditional return period of the non-conditioned variable given the conditioned variable Var_Con
has a return period longer than RP_Con
.
Design_Event_2D
Conditional_RP_2D
#Under a 10yr rainfall event condition, what is the joint probability that a 10yr surge (O-sWL)
#event occurs simultaneously? What is the cumulative probability of events with the frequency
#equal to or less than a 10yr surge event?
Conditional_RP_2D_Equal(Data=S22.Detrend.df,
Data_Con1=con.sample.Rainfall$Data, Data_Con2=con.sample.OsWL$Data,
u1=0.98, u2=0.98,
Copula_Family1=cop.Rainfall,Copula_Family2=cop.OsWL,
Marginal_Dist1="Logis", Marginal_Dist2="Twe",
Con1 = "Rainfall", Con2 = "OsWL",
mu = 365.25,
Con_Var="Rainfall",
RP_Con=10, RP_Non_Con=10,
x_lab = "Rainfall (Inches)", y_lab = "O-sWL (ft NGVD 29)",
y_lim_max = 10,
N=10^8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.