Example (CATPCA command)

CATPCA VARIABLES = TEST1 TEST2 TEST3 TO TEST6 TEST7 TEST8
  /ANALYSIS = TEST1 TO TEST2(WEIGHT=2 LEVEL=ORDI) 
              TEST3 TO TEST5(LEVEL=SPORD INKNOT=3)
              TEST6 TEST7(LEVEL=SPORD DEGREE=3)
              TEST8(LEVEL=NUME) 
  /DISCRETIZATION = TEST1(GROUPING NCAT=5 DISTR=UNIFORM)
              TEST6(GROUPING) TEST8(MULTIPLYING)
  /MISSING = TEST5(ACTIVE) TEST6(ACTIVE EXTRACAT) TEST8(LISTWISE)
  /SUPPLEMENTARY = OBJECT(1 3) VARIABLE(TEST1)
  /CONFIGURATION = ('iniconf.sav')
  /DIMENSION = 2
  /NORMALIZATION = VPRINCIPAL 
  /MAXITER = 150
  /CRITITER = .000001
  /PRINT =  DESCRIP LOADING CORR QUANT(TEST1 TO TEST3) OBJECT
  /PLOT = TRANS(TEST2 TO TEST5) OBJECT(TEST2 TEST3)
  /SAVE = TRDATA OBJECT
  /OUTFILE = TRDATA('/data/trans.sav') OBJECT('/data/obs.sav').
  • VARIABLES defines variables. The keyword TO refers to the order of the variables in the working data file.
  • The ANALYSIS subcommand defines variables that are used in the analysis. TEST1 and TEST2 have a weight of 2. For the other variables, WEIGHT is not specified; thus, they have the default weight value of 1. The optimal scaling level for TEST1 and TEST2 is ordinal. The optimal scaling level for TEST3 to TEST7 is spline ordinal. The optimal scaling level for TEST8 is numerical. The keyword TO refers to the order of the variables in the VARIABLES subcommand. The splines for TEST3 to TEST5 have degree 2 (default because unspecified) and 3 interior knots. The splines for TEST6 and TEST7 have degree 3 and 2 interior knots (default because unspecified).
  • DISCRETIZATION specifies that TEST6 and TEST8, which are fractional-value variables, are discretized: TEST6 by recoding into 7 categories with a normal distribution (default because unspecified) and TEST8 by “multiplying.” TEST1, which is a categorical variable, is recoded into 5 categories with a close-to-uniform distribution.
  • MISSING specifies that objects with missing values on TEST5 and TEST6 are included in the analysis; missing values on TEST5 are replaced with the mode (default if not specified), and missing values on TEST6 are treated as an extra category. Objects with a missing value on TEST8 are excluded from the analysis. For all other variables, the default is in effect; that is, missing values (not objects) are excluded from the analysis.
  • CONFIGURATION specifies iniconf.sav as the file containing the coordinates of a configuration that is to be used as the initial configuration (default because unspecified).
  • DIMENSION specifies 2 as the number of dimensions; that is, 2 components are computed. This setting is the default, so this subcommand could be omitted here.
  • The NORMALIZATION subcommand specifies optimization of the association between variables. This setting is the default, so this subcommand could be omitted here.
  • MAXITER specifies 150 as the maximum number of iterations (instead of the default value of 100).
  • CRITITER sets the convergence criterion to a value that is smaller than the default value.
  • PRINT specifies descriptives, component loadings and correlations (all default), quantifications for TEST1 to TEST3, and the object (component) scores.
  • PLOT requests transformation plots for the variables TEST2 to TEST5, an object points plot labeled with the categories of TEST2, and an object points plot labeled with the categories of TEST3.
  • The SAVE subcommand adds the transformed variables and the component scores to the working data file.
  • The OUTFILE subcommand writes the transformed data to a data file called trans.sav and writes the component scores to a data file called obs.sav, both in the directory /data.