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 |
randomize(0) x = normal(200, 3) cov(x)
Contents of cov [1,] 0.93696 0.02954 -0.04005 [2,] 0.02954 0.93135 0.04436 [3,] -0.04005 0.04436 0.82806
randomize(0) x = normal(200, 2, 3) cov(x)
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