Description Usage Arguments Details Value Author(s) References Examples

Calculates the two sample Chen-Qin test statistic and p-value.

1 | ```
cqtest(X, Y)
``` |

`X` |
A matrix of dimension |

`Y` |
A matrix of dimension Default value is null. If not specified, the function performs a one-sample test using X. |

The Chen-Qin test statistic is used to test equality of mean vectors for two groups of multivariate observations, where the dimension is greater than the sample size. `cqtest`

takes matrices `X`

and `Y`

as arguments whose rows correspond to samples from the two groups respectively. Depending on the values in `X`

and `Y`

, the function initially determines whether to perform a one-sample test ( *\mathop{∑}_{i,j} X_{ij}^2 = 0* or *\mathop{∑}_{i,j} Y_{ij}^2 = 0*) or a two-sample test. The appropriate test statistic is then calculated and is returned along with the p-value which is calculated using right-tailed normal distribution.

**Note:** The Chen-Qin test involves calculations on the data which require at least three samples in both the groups to evaluate the test statistic. See Chen and Qin (2010) for further details.

A *2 \times 1* vector consisting of the test statistic and the p-value.

Deepak N. Ayyala, Javkhlan-Ochir Ganbat.

Chen, S. X. and Qin, Y. (2010) A two-sample test for high-dimensional data with applications in gene-set testing, Annals of Statistics, 38, 808 – 835.

1 2 3 | ```
data(diffMethylData)
cqtest(diffMethylData$region1.x, diffMethylData$region1.y)
# cqtest(diffMethylData$region2.x, diffMethylData$region2.y)
``` |

```
[1] -0.3323809 0.6301992
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.