bCond.treeCKT {CondCopulas}R Documentation

Construct a binary tree for the modeling the conditional Kendall's tau

Description

This function takes in parameter two matrices of observations: the first one contains the observations of XI (the conditioned variables) and the second on contains the observations of XJ (the conditioning variables). The goal of this procedure is to find which of the variables in XJ have important influence on the dependence between the components of XI, (measured by the Kendall's tau).

Usage

bCond.treeCKT(
  XI,
  XJ,
  minCut = 0,
  minProb = 0.01,
  minSize = minProb * nrow(XI),
  nPoints_xJ = 10,
  type.quantile = 7,
  verbose = 2
)

Arguments

XI

matrix of size n*p of observations of the conditioned variables.

XJ

matrix of size n*(d-p) containing observations of the conditioning vector.

minCut

minimum difference in probabilities that is necessary to cut.

minProb

minimum probability of being in one of the node.

minSize

minimum number of observations in each node. This is an alternative to minProb and has priority over it.

nPoints_xJ

number of points in the grid that are considered when choosing the point for splitting the tree.

type.quantile

way of computing the quantiles, see stats::quantile().

verbose

control the text output of the procedure. If verbose = 0, suppress all output. If verbose = 2, the progress of the computation is printed during the computation.

Details

The object return by this function is a binary tree. Each leaf of this tree correspond to one event (or, equivalently, one subset of R^{dim(XJ)}), and the conditional Kendall's tau conditionally to it.

Value

the estimated tree using the data 'XI, XJ'.

References

Derumigny, A., Fermanian, J. D., & Min, A. (2022). Testing for equality between conditional copulas given discretized conditioning events. Canadian Journal of Statistics. doi:10.1002/cjs.11742

See Also

bCond.simpA.CKT for a test of the simplifying assumption that all these conditional Kendall's tau are equal.

treeCKT2matrixInd for converting this tree to a matrix of indicators of each event. matrixInd2matrixCKT for getting the matrix of estimated conditional Kendall's taus for each event.

CKT.estimate for the estimation of pointwise conditional Kendall's tau, i.e. assuming a continuous conditioning variable Z.

Examples

set.seed(1)
n = 200
XJ = MASS::mvrnorm(n = n, mu = c(3,3), Sigma = rbind(c(1, 0.2), c(0.2, 1)))
XI = matrix(nrow = n, ncol = 2)
high_XJ1 = which(XJ[,1] > 4)
XI[high_XJ1, ]  = MASS::mvrnorm(n = length(high_XJ1), mu = c(10,10),
                                Sigma = rbind(c(1, 0.8), c(0.8, 1)))
XI[-high_XJ1, ] = MASS::mvrnorm(n = n - length(high_XJ1), mu = c(8,8),
                                Sigma = rbind(c(1, -0.2), c(-0.2, 1)))

result = bCond.treeCKT(XI = XI, XJ = XJ, minSize = 50, verbose = 2)

# Number of observations in the first two children
print(length(data.tree::GetAttribute(result$children[[1]], "condObs")))
print(length(data.tree::GetAttribute(result$children[[2]], "condObs")))



[Package CondCopulas version 0.1.3 Index]