VARIABLES Subcommand (PRINCALS command)

VARIABLES specifies all of the variables that will be used in the current PRINCALS procedure.

  • The VARIABLES subcommand is required and precedes all other subcommands. The actual word VARIABLES can be omitted.
  • Each variable or variable list is followed by the maximum number of categories (levels) in parentheses.
  • The number specified in parentheses indicates the number of categories and the maximum category value. For example, VAR1(3) indicates that VAR1 has three categories coded 1, 2, and 3. However, if a variable is not coded with consecutive integers, the number of categories used in the analysis will differ from the number of observed categories. For example, if a three category variable is coded {2, 4, 6}, the maximum category value is 6. The analysis treats the variable as having six categories, three of which are not observed and receive quantifications of 0.
  • To avoid unnecessary output, use the AUTORECODE or RECODE command before PRINCALS to recode a categorical variable that was coded with nonsequential values. As noted in “Limitations,” recoding is not recommended with variables treated as numeric (see AUTORECODE and RECODE for more information).

Example

DATA LIST FREE/V1 V2 V3.
BEGIN DATA
3 1 1
6 1 1
3 1 3
3 2 2
3 2 2
6 2 2
6 1 3
6 2 2
3 2 2
6 2 1
END DATA.
AUTORECODE V1 /INTO NEWVAR1.
PRINCALS VARIABLES=NEWVAR1 V2(2) V3(3).
  • DATA LIST defines three variables, V1, V2, and V3.
  • V1 has two levels, coded 3 and 6, V2 has two levels, coded 1 and 2, and V3 has three levels, coded 1, 2, and 3.
  • The AUTORECODE command creates NEWVAR1 containing recoded values of V1. Values of 3 are recoded to 1, and values of 6 are recoded to 2.
  • A maximum value of 2 can then be specified on the VARIABLES subcommand as the maximum category value for both NEWVAR1 and V2. A maximum value of 3 is specified for V3.