Description Usage Arguments Details Value Note Author(s)
Various workhorse functions to compute the marginal (or unconditional)
covariance (and cross-covariance) estimates. The functions feature both the
maximum likelihood and the biased corrected estimates. They are (almost)
equivalent implementations of cov
(stats::cov
)
in Rcpp, RcppArmadillo, and RcppEigen.
1 2 3 4 5 6 7 8 9 10 11 |
X |
A numeric matrix. |
norm_type |
an integer of length one giving the estimator. The
default |
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 cor
-family returns a numeric correlation matrix of size
ncol(X)
times ncol(X)
.
The xcor
-family returns a numeric cross-covariance 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
stats::cor(X)
.
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.