dcorMVtable.Rd
Computes the distances within two sets of variables and the corresponding distance correlation.
dcorMVtable(x, ind = 1, method = "euclidean")
x | A contingency table of class |
---|---|
ind | The indices for the first set of variables. The second set consists of all remaining variables. |
method | The method for dist |
The distance correlation between 0 and 1 for the distances from the two sets of variables.
This code has not been tested thoroughly and may still contain errors.
# NOT RUN { A2 <- arsim(2000,c(8,9),5,0.1) A2 <- optile(A2, iter=100) BCI(A2) wdcor(A2) p1 <- runif(11)+0.1 p1 <- p1/sum(p1) A2b <- apply(A2,1:2,function(z) rmultinom(1,z,p1)) # now the first variable is roughly independent from the other two: dcorMVtable(as.table(A2b),ind = 1) # here the third variable is NOT independent from the others: A3 <- arsim(2000,c(8,9,11),5,0.1) A3 <- optile(A3, iter=100) BCI(A3) dcorMVtable(A3,ind = 3) # }