Computes the sample covariance of two data sets.
The covariance computed is the sample covariance such that .
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
The first N-element data set. |
|
| real(kind=real64), | intent(in), | dimension(size(x)) | :: | y |
The second N-element data set. |
Sample covariance; fewer than two observations or nonfinite inputs give NaN. An unrepresentable result gives signed infinity.
Computes sample covariance using independent copies of two columns. Unequal counts cause ERROR STOP with FS_ARRAY_SIZE_ERROR.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(data_column), | intent(in) | :: | x |
Paired observation columns, unchanged; unallocated storage is empty. |
||
| class(data_column), | intent(in) | :: | y |
Paired observation columns, unchanged; unallocated storage is empty. |
Sample covariance; fewer than two pairs or nonfinite values give NaN. Unrepresentable results give signed infinity.
Computes sample covariance between a column and an array, copying the column. Unequal counts cause ERROR STOP with FS_ARRAY_SIZE_ERROR.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(data_column), | intent(in) | :: | x |
The first observation column, unchanged; unallocated storage is empty. |
||
| real(kind=real64), | intent(in), | dimension(:) | :: | y |
The paired observations; must have x's count. |
Sample covariance; undersized/nonfinite data give NaN; unrepresentable results give signed infinity.
Computes sample covariance between an array and a column, copying the column. Unequal counts cause ERROR STOP with FS_ARRAY_SIZE_ERROR.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
The first observation array. |
|
| class(data_column), | intent(in) | :: | y |
The paired observation column, unchanged; must have size(x) values. Unallocated storage is treated as empty. |
Sample covariance; undersized/nonfinite data give NaN; unrepresentable results give signed infinity.