subcopemc: Bivariate Empirical Sucopula of Given Approximation Order

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Calculation of bivariate empirical subcopula matrix of given approximation order, induced partitions, standardized bivariate sample, and dependence measures for a given continuous bivariate sample.

Usage

1
subcopemc(mat.xy, m = nrow(mat.xy), display = FALSE)

Arguments

mat.xy

2-column matrix with bivariate observations of a continuous random vector (X,Y).

m

integer value of approximation order, where m = 2,...,n with n equal to sample size.

display

logical value indicating if graphs and dependence values should be displayed.

Details

Both random variables X and Y must be continuous, and therefore repeated values in the sample are not expected. If found, jitter will be applied to break ties. NA values are not allowed.

Value

A list containing the following components:

depMon

monotone standardized supremum distance in [-1,1].

depMonNonSTD

monotone non-standardized supremum distance [min,value,max].

depSup

standardized supremum distance in [0,1].

depSupNonSTD

non-standardized supremum distance [min,value,max].

matrix

matrix with empirical subcopula values.

part1

vector with partition induced by first variable X.

part2

vector with partition induced by second variable Y.

sample.size

numeric value of sample size.

order

numeric value of approximation order.

std.sample

2-column matrix with the standardized bivariate sample.

sample

2-column matrix with the original bivariate sample of (X,Y).

If display = TRUE then the values of depMon, depMonNonSTD, depSup, and depSupNonSTD will be displayed, and the following graphs will be generated: marginal histograms of X and Y, scatterplots of the original and the standardized bivariate sample, contour and image bivariate graphs of the empirical subcopula.

Note

If approximation order m > 2000 calculation may take more than 2 minutes. Usually m = 50 would be enough for an acceptable approximation.

Author(s)

Arturo Erdely https://sites.google.com/site/arturoerdely

References

Durante, F. and Sempi, C. (2016) Principles of Copula Theory. Taylor and Francis Group, Boca Raton.

Erdely, A. (2017) A subcopula based dependence measure. Kybernetika 53(2), 231-243. DOI: 10.14736/kyb-2017-2-0231

Nelsen, R.B. (2006) An Introduction to Copulas. Springer, New York.

See Also

subcopem

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## Example 1: Independent Normal and Gamma

n <- 300  # sample size
X <- rnorm(n)         # Normal(0,1)
Y <- rgamma(n, 2, 3)  # Gamma(2,3)
XY <- cbind(X, Y)  # 2-column matrix with bivariate sample
cor(XY, method = "pearson")[1, 2]   # Pearson's correlation
cor(XY, method = "spearman")[1, 2]  # Spearman's correlation
cor(XY, method = "kendall")[1, 2]  # Kendall's correlation
SC <- subcopemc(XY,, display = TRUE)
str(SC)
## Approximation of order m = 15
SCm15 <- subcopemc(XY, 15, display = TRUE)
str(SCm15)

## Example 2: Non-monotone dependence

n <- 300  # sample size
Theta <- runif(n, 0, 2*pi)  # Uniform circular distribution
X <- cos(Theta)
Y <- sin(Theta)
XY <- cbind(X, Y)  # 2-column matrix with bivariate sample
cor(XY, method = "pearson")[1, 2]   # Pearson's correlation
cor(XY, method = "spearman")[1, 2]  # Spearman's correlation
cor(XY, method = "kendall")[1, 2]  # Kendall's correlation
SC <- subcopemc(XY,, display = TRUE)
str(SC)
## Approximation of order m = 15
SCm15 <- subcopemc(XY, 15, display = TRUE)
str(SCm15)

subcopem2D documentation built on May 2, 2019, 2:46 p.m.