ind.ictest | R Documentation |
Performs the test that a group of variables is independent of an other based on marginal ranks. It is assumed that the data follows a symmetric IC model. Three different score functions are available.
ind.ictest(X, index1, index2 = NULL, scores = "rank",
method = "approximation", n.simu = 1000,
..., 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 signed rank test is performed or if 'normal' a normal score test is performed. |
method |
defines the method used for the computation of the p-value. The possobilites are "approximation" (default), "simulation" or "permutation". Details below. |
n.simu |
if ' |
... |
further arguments to be passed to the function |
na.action |
a function which indicates what should happen when the data contain 'NA's. Default is to fail. |
Assumed is here that X[ , index1]
comes from a symmetric independent component model which in turn is independent from X[ , index2]
which has also
an underlying symmetric independent component model. This function recovers the independent components using the function ics
, centers them by a marginal
loaction estimate based on the same scores that will be used in the actual test. The test is described in Oja, Paindaveine and Taskinen (2009).
The asymptotic chi-square distibution is however even for large sample sizes inadequat and therefore p-values can be simulated by resampling the test statistic under the null
hypothesis or by permuting the rows of the independent components of X[ , index2]
. Both alternatives are also described in Oja, Paindaveine and Taskinen (2009).
A list with class 'htest' containing the following components:
statistic |
the value of the Q-statistic. |
parameter |
the degrees of freedom for the Q-statistic or the number of replications depending on the chosen method. |
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
Oja, H. and Paindaveine, D. and Taskinen, S. (2016), Affine-invariant rank tests for multivariate independence in independent component models, Electronic Journal of Statistics, 10, 2372–2419.
Z1<-cbind(rt(500,5),rnorm(500),runif(500))
Z2<-cbind(rt(500,8),rbeta(500,2,2))
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(Z1 %*% t(A1), Z2 %*% t(A2))
ind.ictest(X,1:3)
ind.ictest(X,1:3,method="simu")
ind.ictest(X,1:2,3:5,method="perm", S1=tyler.shape,S2=cov)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.