Diagonal Values (MATRIX DATA command)

FORMAT has two keywords that refer to the diagonal values:

DIAGONAL. Data include the diagonal values. This is the default.

NODIAGONAL. Data do not include diagonal values. The diagonal value is set to the system-missing value for all matrices except the correlation matrices. For correlation matrices, the diagonal value is set to 1. NODIAGONAL cannot be specified with FULL.

The following table shows how data might be entered for each combination of FORMAT settings that govern matrix shape and diagonal values. With UPPER NODIAGONAL and LOWER NODIAGONAL, you do not enter the matrix row that has blank values for the continuous variables. If you enter that row, MATRIX DATA cannot properly form the matrix.

Table 1. Various FORMAT settings
FULL UPPER DIAGONAL UPPER NODIAGONAL LOWER DIAGONAL LOWER NODIAGONAL
MEAN 5 4 3 MEAN 5 4 3 MEAN 5 4 3 MEAN 5 4 3 MEAN 5 4 3
SD 3 2 1 SD 3 2 1 SD 3 2 1 SD 3 2 1 SD 3 2 1
N 9 9 9 N 9 9 9 N 9 9 9 N 9 9 9 N 9 9 9
CORR 1 .6 .7 CORR 1 .6 .7 CORR .6 .7 CORR 1 CORR .6
CORR .6 1 .8 CORR 1 .8 CORR .8 CORR .6 1 CORR .7 .8
CORR .7 .8 1 CORR 1   CORR .7 .8 1  

Example

MATRIX DATA VARIABLES=ROWTYPE_ V1 TO V3
   /FORMAT=UPPER NODIAGONAL.
BEGIN DATA
MEAN   5  4  3
SD     3  2  1
N      9  9  9
CORR     .6 .7
CORR        .8
END DATA.
LIST.
  • FORMAT specifies the upper-triangle format with no diagonal values. The default LIST is in effect for the data-entry format.

Example

MATRIX DATA VARIABLES=ROWTYPE_ V1 TO V3
   /FORMAT=UPPER NODIAGONAL.
BEGIN DATA
MEAN 5 4 3
SD 3 2 1
N 9 9 9
CORR .6 .7
CORR .8
END DATA.
LIST.
  • This example is identical to the previous example. It shows that data do not have to be aligned in columns. Data throughout this section are aligned in columns to emphasize the matrix format.