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

Group: Statistical Data Analysis
Topic: Basic Statistics
See also: corr var

Function: cov
Description: Computes the covariance structure of a given array.

Usage: s = cov (x)
Input:
x array
Output:
s consists of covariance matrices of x

Example:
randomize(0)
x = normal(200, 3)
cov(x)

Result:
Contents of cov
[1,]  0.93696  0.02954 -0.04005
[2,]  0.02954  0.93135  0.04436
[3,] -0.04005  0.04436  0.82806
Example:
randomize(0)
x = normal(200, 2, 3)
cov(x)

Result:
Contents of cov
[,,1,1,1,1,1,1]
[1,] 0.93696 0.0295402
[2,] 0.0295402 0.931349
[,,2,1,1,1,1,1]
[1,] 0.828057 0.0111894
[2,] 0.0111894 1.11964
[,,3,1,1,1,1,1]
[1,] 1.05956 0.134594
[2,] 0.134594 0.990536



(C) MD*TECH Method and Data Technologies, 05.02.2006