Forms the correlation matrix for a list of variates (R.W. Payne).

### Options

`PRINT` = string tokens |
Printed output (`correlations` , `test` ); default `corr` |
---|---|

`METHOD` = string token |
Type of test to make (against zero) for the correlations (`twosided` , `greater` , `lessthan` ); default `twos` |

`WEIGHTS` = variate |
Provides weights for the units of the variates; default `*` assumes that they all have weight one |

`CORRELATIONS` = symmetric matrix |
Saves the correlations |

`PROBABILITIES` = symmetric matrix |
Saves the test probabilities |

`NOBSERVATIONS` = scalars |
Saves the number of observations from which the correlations have been calculated |

### Parameter

`DATA` = variates |
Variates for which the matrix is to be calculated |
---|

### Method

`FCORRELATION`

forms the correlation matrix for a set of variates which should be listed by the `DATA`

parameter. The `WEIGHTS`

option can provide a variate of weights for the units of the variates; by default these are all assumed to have weight one.

Printed output is controlled by the `PRINT`

option with settings:

`correlations` |
prints the correlation matrix; |
---|---|

`tests` |
prints tests for the correlations. |

By default `PRINT=correlation`

. The `METHOD`

option indicates the type of test to be done, with settings:

`twosided` |
for a two-sided test of the null hupothesis that that the correlation is zero; |
---|---|

`greaterthan` |
for a one-sided test of the null hypothesis that the correlation is not greater than zero; |

`lessthan` |
for a one-sided test of the null hypothesis that the correlation is not less than zero. |

Tests cannot be produced if there are fewer than two observations.

The correlation matrix can be saved using the `CORRELATIONS`

option, the (symmetric) matrix of test probabilities can be saved using the `PROBABILITIES`

option, and the number of observations upon which it is based can be saved using `NOBSERVATIONS`

option.

Options: `PRINT`

, `METHOD`

, `WEIGHTS`

, `CORRELATIONS`

, `PROBABILITIES`

, `NOBSERVATIONS`

.

Parameter: `DATA`

.

### Method

A SSPM structure is set up for the `DATA`

variates, and its values are formed using the `FSSPM`

directive. The corrected sums of squares and products are divided by the residual degrees of freedom to give the variance covariance matrix, and the `CORRMAT`

function is used to convert this to a correlation matrix. The test probabilities are obtained using the `PRCORRELATION`

procedure.

### Action with `RESTRICT`

`FCORRELATION`

takes account of restrictions on any of the variates.

### See also

Directive: `CORRELATE`

.

Procedures: `DCORRELATION`

, `FVCOVARIANCE`

, `PARTIALCORRELATIONS`

, `PRCORRELATION`

, `SCORRELATION`

.

Commands for: Basic and nonparametric statistics, Calculations and manipulation.

### Example

CAPTION 'FCORRELATION example',\ 'Data from Draper & Smith, 1981, Applied Regression Analysis.\'; STYLE=meta,plain VARIATE [VALUES=129,141,153,166,193,189,175,186,190,187,\ 195,206,198,192,191,200,200] Employees & [VALUES=21,22,22,20,25,23,20,23,20,20,\ 22,19,22,22,21,21,22] Operatingdays & [VALUES=7.107,6.373,6.796,9.208,14.792,\ 14.564,11.964,13.526,12.656,14.119,16.691,\ 14.571,13.619,14.575,14.556,18.573,15.618] Production & [VALUES=58.8,65.2,70.9,77.4,79.3,81,71.9,63.9,54.5,39.5,\ 44.5,43.6,56,64.7,73,78.9,79.4] Temperature & [VALUES=3.067,2.828,2.891,2.994,3.082,\ 3.898,3.502,3.06,3.211,3.286,3.542,\ 3.125,3.022,2.922,3.95,4.488,3.295] Wateruse FCORRELATION [PRINT=correlation, test]\ Employees,Operatingdays,Production,Temperature,Wateruse