dependence {subcopem2D} | R Documentation |
Dependence Measures
Description
Calculation of pairwise monotone and supremum dependence, monotone/supremum dependence ratio, and proportion of pairwise NAs.
Usage
dependence(mat, cont = NULL, sc.order = 0)
Arguments
mat |
|
cont |
vector of column numbers to consider/coerce as continuous random variables (optional). |
sc.order |
order of subcopula approximation (continuous random variables). If |
Details
Each of the random variables in the k
-dimensional random vector under consideration may be of any kind (discrete, continuous, or mixed). NA values are allowed.
Value
A 3-dimensional array k\times k\times 4
with pairwise monotone and supremum dependence, monotone/supremum dependence ratio, and proportion of pairwise NAs.
Note
NA values are allowed.
Author(s)
Arturo Erdely https://sites.google.com/site/arturoerdely
References
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
Examples
V <- runif(300) # Continuous Uniform(0,1)
W <- V*(1-V) # Continuous transform of V
# X given V=v as continuous Uniform(0,v)
X <- mapply(runif, rep(1, length(V)), rep(0, length(V)), V)
Y <- 1*(0.2 < X)*(X < 0.6) # Discrete transform of X
Z <- X*(0.1 < X)*(X < 0.9) + 1*(X >= 0.9) # Mixed transform of X
V[1:10] <- NA # Introducing some NAs
W[3:12] <- NA # Introducing some NAs
Y[5:25] <- NA # Introducing some NAs
vector5D <- cbind(V, W, X, Y, Z) # Matrix of 5-variate observations
# Monotone and supremum dependence, ratio and proportion of NAs:
(deparray <- dependence(vector5D, cont = c(1, 2, 3), 30))
# Pearson's correlations:
cor(vector5D, method = "pearson", use = "pairwise.complete.obs")
# Spearman's correlations:
cor(vector5D, method = "spearman", use = "pairwise.complete.obs")
# Kendall's correlations:
cor(vector5D, method = "kendall", use = "pairwise.complete.obs")
pairs(vector5D) # Matrix of pairwise scatterplots