matcor: Correlations matrices

Description Usage Arguments Value Author(s) See Also Examples

Description

The function computes the correlation matrices within and between two datasets.

Usage

1
matcor(X, Y)

Arguments

X

numeric matrix (n * p), containing the X coordinates.

Y

numeric matrix (n * q), containing the Y coordinates.

Value

A list containing the following components:

Xcor

Correlation matrix (p * p) for the X variables

Ycor

Correlation matrix (q * q) for the Y variables

XYcor

Correlation matrix ((p+q) * (p+q)) between X and Y variables

Author(s)

Sébastien Déjean, Ignacio González

See Also

img.matcor

Examples

1
2
3
4
5
6
data(nutrimouse)
X=as.matrix(nutrimouse$gene)
Y=as.matrix(nutrimouse$lipid)
correl=matcor(X,Y)
img.matcor(correl)
img.matcor(correl,type=2)

Example output

Loading required package: fda
Loading required package: splines
Loading required package: Matrix

Attaching package: 'fda'

The following object is masked from 'package:graphics':

    matplot

Loading required package: fields
Loading required package: spam
Loading required package: dotCall64
Loading required package: grid
Spam version 2.1-1 (2017-07-02) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction 
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.

Attaching package: 'spam'

The following objects are masked from 'package:base':

    backsolve, forwardsolve

Loading required package: maps

CCA documentation built on March 1, 2021, 9:06 a.m.