FACTORS Subcommand (MATRIX DATA command)

FACTORS specifies the variables whose values define the cells represented by the within-cells data. FACTORS must follow the VARIABLES subcommand.

  • FACTORS specifies a subset of the variables named on the VARIABLES subcommand. The keyword TO can be used to imply variables in the order in which they are named on VARIABLES.
  • If ROWTYPE_ is explicit on VARIABLES and its values are included in the data, records that represent pooled information have the system-missing value (indicated by a period) for the factors, since the values of ROWTYPE_ are ambiguous.
  • If ROWTYPE_ is not specified on VARIABLES and its values are not in the data, enter data values for the factors only for records that represent within-cells information. Enter nothing for the factors for records that represent pooled information. CELLS must be specified to indicate the number of within-cells records, and CONTENTS must be specified to indicate which record types have within-cells data.

Example

* Rowtype is explicit.
 
MATRIX DATA VARIABLES=ROWTYPE_ F1 F2  VAR1 TO VAR3
  /FACTORS=F1 F2.
BEGIN DATA
MEAN 1 1  1  2  3
SD   1 1  5  4  3
N    1 1  9  9  9
MEAN 1 2  4  5  6
SD   1 2  6  5  4
N    1 2  9  9  9
MEAN 2 1  7  8  9
SD   2 1  7  6  5
N    2 1  9  9  9
MEAN 2 2  9  8  7
SD   2 2  8  7  6
N    2 2  9  9  9
CORR . . 1
CORR . . .6  1
CORR . . .7 .8  1
END DATA.
  • ROWTYPE_ is specified on VARIABLES.
  • Factor variables must be specified on both VARIABLES and FACTORS.
  • Periods in the data represent missing values for the CORR factor values.

Example

* Rowtype is implicit.
 
MATRIX DATA VARIABLES=F1 F2  VAR1 TO VAR3
  /FACTORS=F1 F2 /CONTENTS=(MEAN SD N) CORR /CELLS=4.
BEGIN DATA
1 1  1  2  3
1 1  5  4  3
1 1  9  9  9
1 2  4  5  6
1 2  6  5  4
1 2  9  9  9
2 1  7  8  9
2 1  7  6  5
2 1  9  9  9
2 2  9  8  7
2 2  8  7  6
2 2  9  9  9
     1
    .6  1
    .7 .8 1
END DATA.
  • ROWTYPE_ is not specified on VARIABLES. The three values after the factor values in each row contain the ROWTYPE_ values for the three continuous variables: VAR1, VAR2, and VAR3.
  • Nothing is entered for the CORR factor values because the records contain pooled information.
  • CELLS is required because there are factors in the data and ROWTYPE_ is implicit.
  • CONTENTS is required to define the record types and to differentiate between the within-cells and pooled types.

Note that the data rows in this example are the same as in the previous example, except for the presence/absence of ROWTYPE_.