Correlate each column of 1 matrix with the same column in another matrix
Usage
corByColumns(x, y)
corByColumns_mask(x, y, mask)
corStatsByColumns(x, y)
Value
corByColumns() and corByColumns_mask() return
a numeric vector of correlations of each pair of columns.
corStatsByColumns() returns a list with named items:
cormean: the aggregated correlation coefficient of all column pairs (see Details)
allcors: the correlations of each column pair
xvar: the column variances of matrix x
yvar: the column variances of matrix y
covar: the covariances of each column pair
Arguments
x, y
Matrices whose values to correlate by column.
mask
Logical matrix marking which data points to include.
Author
Sercan Kahveci
Details
The primary use for these functions is to rapidly compute the correlations
between two sets of split-half scores stored in matrix columns.
corStatsByColumns produces the mean correlation of all column-pairs
using the formula mean(covariances) / sqrt(mean(col1variance) * mean(col2variance))
This method is more accurate than cormean() and was suggested by
prof. John Christie of Dalhousie University.