# Correlation matrices test by rows

### Description

Tests whether the *g*th row of a correlation matrix is either non-zero or different to the same row of another correlation matrix. Allows for paired data.

### Usage

1 2 3 |

### Arguments

`D1` |
first population dataset in matrix |

`D2` |
second population dataset in matrix |

`testStatistic` |
test statistic used for the hypothesis testing: name that uniquely identifies |

`nite` |
number of iterations used to generate the permuted samples. |

`paired` |
if |

`exact` |
permuted samples method: if |

`subMatComp` |
used to reduce computational time when using the test in very high dimensional data. If |

`iniP` |
only for |

`finP` |
only for |

`conf.level` |
confidence level of the interval. |

### Details

This test uses a sum of squares based test statistic as given by the adjusted squared correlation `cor2mean.adj`

as well as an extreme value based test statistic as given by `max`

.

Null distributions are approximated differently when testing equality of two correlation rows and testing if correlation rows are equal to zero.
In the first case, permuted samples are used to construct the confidence interval (see details in `eqCorrMatTest`

).
In the latter, they are found using Monte Carlo samples. For instance, *n* iid observations from a normal distribution *N(0,1)* are generated.
Then, the adjusted square (or absolute maximum) correlations between these montecarlo samples and the original data *D1* are found.

### Value

An object of class `eqCorTestByRows`

containing the following components:

`AStest ` |
average of squares test statistics. |

`pvalAS ` |
average of squares test p-values. |

`ciAS ` |
average of of squares test statistic confidence interval. |

`Maxtest ` |
extreme value test statistics. |

`pvalMax ` |
extreme value test p-values. |

`ciMax ` |
extreme value test statistic confidence interval. |

### Author(s)

Caballe, Adria <a.caballe@sms.ed.ac.uk>, Natalia Bochkina and Claus Mayer.

### References

to come.

### See Also

`plot.eqCorTestByRows`

for graphical representation.

`eqCorrMatTest`

for testing equality of two correlation matrices.

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
#### data
EX2 <- pcorSimulatorJoint(nobs = 200, nclusters = 3, nnodesxcluster = c(60,40,50),
pattern = "pow", diffType = "cluster", dataDepend = "diag",
pdiff = 0.5)
#### eq corr by rows
## not run
#test1 <- eqCorTestByRows(EX2$D1, EX2$D2, testStatistic = c("AS", "max"),
# nite = 200, paired = TRUE, exact = TRUE, subMatComp = FALSE,
# iniP = 1, finP = 40, conf.level = 0.95)
#print(test1)
#### zero corr by rows
#test2 <- eqCorTestByRows(EX2$D1, testStatistic = c("AS", "max"), nite = 1000,
# conf.level = 0.95)
#print(test2)
``` |