Conditionally sampling a two dimensional dataset
Con_Sampling_2D_Lag.Rd
Creates a data frame where the declustered excesses of a (conditioning) variable are paired with the maximum value of a second variable over a specified time-lag.
Usage
Con_Sampling_2D_Lag(
Data_Detrend,
Data_Declust,
Con_Variable,
u = 0.97,
Thres = NA,
Lag_Backward = 3,
Lag_Forward = 3
)
Arguments
- Data_Detrend
Data frame containing two at least partially concurrent time series, detrended if necessary. Time steps must be equally spaced, with missing values assigned
NA
. First object may be a"Date"
object. Can beDataframe_Combine
output.- Data_Declust
Data frame containing two (independently) declustered at least partially concurrent time series. Time steps must be equally spaced, with missing values assigned
NA
. Columns must be in the same order as inData_Detrend
. First object may be a"Date"
object. Can beDataframe_Combine
output.- Con_Variable
Column number (1 or 2) or the column name of the conditioning variable. Default is
1
.- u
Threshold, as a quantile of the observations of the conditioning variable. Default is
0.97
.- Thres
Threshold expressed on the original scale of the observations. Only one of
u
andThres
should be supplied. Default isNA
.- Lag_Backward
Positive lag applied to variable not assigned as the
Con_Variable
. Default is3
- Lag_Forward
Negative lag to variable not assigned as the
Con_Variable
. Default is3
Value
List comprising the specified Threshold
as the quantile of the conditioning variable above which declustered excesses are paired with co-occurences of the other variable, the resulting two-dimensional sample data
and Con_Variable
the name of the conditioning variable. The index of the input dataset that correspond to the events of the conditioning variable x.con
and the non-conditioning variable x.noncon
in the conditonal sample are also provided.