Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: xplore
See also: cov var

Quantlet: corr
Description: computes the (Bravais-Pearson) correlation matrix of a given array

Usage: r = corr(x)
Input:
x n x p x d1 x ... x dn array
Output:
r p x p x d1 x ... x dn array, the p x p correlation matrices

Example:
library("xplore")
randomize(0)
x = normal(200, 3, 2)
corr(x)

Result:
Contents of r
[,,1,1,1,1,1,1]
[1,]        1  0.031623 -0.045468
[2,]  0.031623        1  0.050513
[3,] -0.045468  0.050513        1
[,,2,1,1,1,1,1]
[1,]        1  0.029059 -0.07081
[2,]  0.029059        1  0.13138
[3,] -0.07081  0.13138        1



Author: MD*Tech, 20021127 licence MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006