Learn R Programming

CondCopulas (version 0.2.0)

bCond.pobs: Computing the pseudo-observations in case of discrete conditioning events

Description

Let \(A_1, ..., A_p\) be \(p\) events forming a partition of a probability space and \(X_1, ..., X_d\) be \(d\) random variables. Assume that we observe \(n\) i.i.d. replications of \((X_1, ..., X_d)\), and that for each \(i=1, ..., d\), $$V_{i,j|A} = F_{X_j | A_k}(X_{i,j} | A_k),$$ we also know which of the \(A_k\) was realized. This function computes the pseudo-observations where \(k\) is such that the event \(A_k\) is realized for the \(i\)-th observation.

Usage

bCond.pobs(X, partition)

Value

a matrix of size n * d

containing the conditional pseudo-observations \(V_{i,j|A}\).

Arguments

X

matrix of size n * d observations of conditioned variables.

partition

matrix of size n * p, where p is the number of conditioning events that are considered. partition[i,k] should be the indicator of whether the i-th observation belongs or not to the k-th conditioning event.

References

Derumigny, A., & Fermanian, J. D. (2017). About tests of the “simplifying” assumption for conditional copulas. Dependence Modeling, 5(1), 154-197. tools:::Rd_expr_doi("10.1515/demo-2017-0011")

Derumigny, A., & Fermanian, J. D. (2022) Conditional empirical copula processes and generalized dependence measures Electronic Journal of Statistics, 16(2), 5692-5719. tools:::Rd_expr_doi("10.1214/22-EJS2075")

See Also

bCond.estParamCopula for the estimation of a (conditional) parametric copula model in this framework.

bCond.treeCKT that provides a binary tree based on conditional Kendall's tau and that can be used to derive relevant conditioning events.

Examples

Run this code
n = 800
Z = stats::runif(n = n)
CKT = 0.2 * as.numeric(Z <= 0.3) +
  0.5 * as.numeric(Z > 0.3 & Z <= 0.5) +
  - 0.8 * as.numeric(Z > 0.5)
simCopula = VineCopula::BiCopSim(N = n,
  par = VineCopula::BiCopTau2Par(CKT, family = 1), family = 1)
X1 = simCopula[,1]
X2 = simCopula[,2]
partition = cbind(Z <= 0.3, Z > 0.3 & Z <= 0.5, Z > 0.5)
condPseudoObs = bCond.pobs(X = cbind(X1, X2),
                           partition = partition)

Run the code above in your browser using DataLab