R: Test of Independence based on Marginal Ranks in a Symmetric...

ind.ictest {ICSNP} | R Documentation

## Test of Independence based on Marginal Ranks in a Symmetric IC Model

### Description

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.

### Usage

    ind.ictest(X, index1, index2 = NULL, scores = "rank",
               method = "approximation", n.simu = 1000,
               ..., na.action = na.fail)

### Arguments

`X` | a data frame or matrix.
`index1` | integer vector that selects the columns of `X` that form group one. Only numeric columns can be selected.
`index2` | integer vector that selects the columns of `X` that form group two. Only numeric columns can be selected. If `NULL`, all remaining columns of X will be selected.
`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 '`method` = "simulation"' or '`method` = "permutation"' this specifies the number of replications used in the simulation or permutation procedure.
`...` | further arguments to be passed to the function `ics`
`na.action` | a function which indicates what should happen when the data contain 'NA's. Default is to fail.

### Details

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).

### Value

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.

### Author(s)

Klaus Nordhausen, klaus.nordhausen@uta.fi

### References

Oja, H. and Paindaveine, D. and Taskinen, S. (2009), Parametric and Nonparametric Test for Multivariate Independence in IC Models, Manuscript, 1, 1–47.

### Examples

    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)

[Package ICSNP version 1.1-0 Index]