Description Usage Arguments Details Value Note Author(s)
Various workhorse functions to compute the marginal (or unconditional)
correlations (and cross-correlation) estimates efficiently.
They are (almost)
equivalent implementations of cor
in Rcpp,
RcppArmadillo, and RcppEigen.
1 2 3 4 5 6 7 8 9 10 11 |
X |
A numeric matrix. |
Y |
A numeric matrix of compatible dimension with the |
Functions almost like cor
.
For the xcorXX
functions, the i
'th and j
'th
entry of the output matrix is the correlation between X[i, ]
and
X[j, ]
.
Likewise, for the xcorXX
functions, the i
'th and
j
'th entry of the output is the correlation between X[i, ]
and Y[j, ]
.
The corXX
family returns a numeric correlation matrix of size
ncol(X)
times ncol(X)
.
The xcorXX
family returns a numeric cross-correlation matrix
of size ncol(X)
times ncol(Y)
.
NA
s in X
or Y
will yield NA
s in the correlation matrix.
This also includes the diagonal unlike the behavior of
cor
.
Anders Ellern Bilgrau <anders.ellern.bilgrau (at) gmail.com>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.