ind.ctest | R Documentation |
Performs the test that a group of variables is independent of an other based on marginal ranks. Three different score functions are available.
ind.ctest(X, index1, index2 = NULL, scores = "rank",
na.action = na.fail)
X |
a data frame or matrix. |
index1 |
integer vector that selects the columns of |
index2 |
integer vector that selects the columns of |
scores |
if 'sign', a sign test is performed, if 'rank' a rank test is performed or if 'normal' a normal score test is performed. |
na.action |
a function which indicates what should happen when the data contain 'NA's. Default is to fail. |
The test tests if X[ , index1] is independent of X[ , index2] and is described in great detail in Puri and Sen (1971).
A list with class 'htest' containing the following components:
statistic |
the value of the W-statistic. |
parameter |
the degrees of freedom for the W-statistic. |
p.value |
the p-value for the test. |
method |
a character string indicating what type of test was performed. |
data.name |
a character string giving the name of the data. |
Klaus Nordhausen
Puri , M.L. and Sen, P.K. (1971), Nonparametric Methods in Multivariate Analysis, New York: Wiley.
A1 <- matrix(c(4, 4, 5, 4, 6, 6, 5, 6, 7), ncol = 3)
A2 <- matrix(c(0.5, -0.3, -0.3, 0.7), ncol = 2)
X <- cbind(rmvnorm(100, c(-1, 0, 1), A1), rmvnorm(100, c(0, 0), A2))
ind.ctest(X,1:3)
ind.ctest(X, c(1, 5), c(2, 3), scores = "normal")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.