# emp_c_copula: The empirical checkerboard copula In qad: Quantification of Asymmetric Dependence

 emp_c_copula R Documentation

## The empirical checkerboard copula

### Description

The function `emp_c_copula()` computes the mass distribution of the empirical (checkerboard) copula, given a bivariate sample. `emp_c_copula_eval()` evaluates the the empirical (checkerboard) copula at given points. If `smoothing` = FALSE, the empirical copula is computed (if there are ties in the sample an adjusted empirical copula is computed), otherwise the empirical checkerboard copula - a smoothed version of the empirical copula - is computed. For more information of the calculations, see details.

### Usage

```emp_c_copula(X, smoothing = TRUE, resolution)

emp_c_copula_eval(X, u, smoothing = TRUE, resolution)
```

### Arguments

 `X` a data frame with two columns containing the observations of the sample. Each row contains one observation. `smoothing` a logial indicating whether the checkerboard aggregation is computed (default = TRUE). `resolution` an integer indicating the resolution of the checkerboard aggregation, i.e. the number of vertical/horizontal strips of the checkerboard copula. `u` a data.frame with two columns containing the evaluation points. Each row consists of a x and y value.

### Details

If the observations come from a distribution with continuous margins, i.e. there are no ties in the sample, the function `emp_c_copula()` gives the same result as the function `C.n()` in the `copula` package. If there are ties in the sample, the empirical copula is adjusted and calculated in the following way:
Let (u_i,v_i) := (F_n(x_i),G_n(y_i)) be the pseudo-observations for i in {1,...,n} and (u_1',v_1'),..., (u_m',v_m') the distinct pairs of pseudo-observations with m leq n. Moreover set S_1:={0, u_1, ..., u_m_1} and S_2:={0, v_1,..., v_m_2} and define the quantities t_i,r_i and s_i for i=1,..., m by

t_i := sum_{j=1}^n 1_{(u_i',v_i')}(u_j,v_j)

r_i := sum_{j=1}^n 1_{u_i}(u_j)

s_i := sum_{j=1}^n 1_{v_i}(v_j)

where 1 defines the indicator function. Define the empirical subcopula A'_n: S_1 x S_2 to {0,1/n, ..., (n-1)/n,1} by

A'_n(s_1,s_2)= 1/n sum_{i=1}^m t_i * 1_{[0,s_1] x [0,s_2]} (u_i', v_i')=1/n sum_{i=1}^n 1_{[0,s_1] x [0,s_2]} (u_i, v_i)

for all s_1 in S_1 and s_2 in S_2.
We extend the subcopula A'_n to a copula by defining the transformations w_i:[0,1]^2 to [u_i'-r_i/n,u_i'] x [v_i'-s_i/n,v_i'] by

w_i(x,y)=(u_i'-r_i/n+r_i*x/n, v_i'-s_i/n + s_iy/n)

and set the measure of the empirical copula mu_A_n^B := 1/n sum_i=1^m t_i mu_B^w_i, where B denotes the product copula.

The checkerboard aggregation is computed as usual (see references).

### Value

`emp_c_copula()` returns a matrix with the mass distribution of the empirical (checkerboard) copula.

`emp_c_copula_eval()` returns a vector of evaluations of the empirical (checkerboard) copula.

### Note

The calculation of the empirical copula with a high sample size (and resolution rate) can take time.

### References

Deheuvels, P. (1979). La fonction de dependance empirique et ses proprietas: un test non parametrique d'independance, Acad. Roy. Belg. Bull. Cl. Sci., 5th Ser. 65, 274-292.

Li, X., Mikusinski, P. and Taylor, M.D. (1998). Strong approximation of copulas, Journal of Mathematical Analysis and Applications, 255, 608-623.

Genest, C., Neshlehova J.G. and Remillard, B. (2014). On the empirical multilinear copula process for count data. Bernoulli, 20 (3), 1344-1371.

qad documentation built on Dec. 28, 2022, 2:54 a.m.