Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The CORRESP Procedure

Using the VAR Statement

With VAR statement input, the rows of the contingency table correspond to the observations of the input data set, and the columns correspond to the VAR statement variables. The values of the variables typically contain the table frequencies. The example displayed in Figure 24.4 could be run with VAR statement input using the following code:

   data Ages;
      input Sex $ Old Young;
      datalines;
   Female  2 2
   Male    4 3
   ;

   proc corresp data=Ages dimens=1 observed short;
      var Old Young;
      id Sex;
   run;

Only nonnegative values are accepted. Negative values are treated as missing, causing the observation to be excluded from the analysis. The values are not required to be integers. Row labels for the table are specified with an ID variable. Column labels are constructed from the variable name or variable label if one is specified. When you specify multiple correspondence analysis (MCA), the row and column labels are the same and are constructed from the variable names or labels, so you cannot include an ID statement. With MCA, the VAR statement must list the variables in the order in which the rows occur. For example, the table displayed in Figure 24.6, which was created with the following TABLES statement,

      tables Hair Height Sex Age;

is input as follows with the VAR statement:

   proc corresp data=table nvars=4 mca;
      var Blond Brown White Short Tall Female Male Old Young;
   run;

You must specify the NVARS= option to specify the number of original categorical variables with the MCA option. The option NVARS=n is needed to find boundaries between the subtables of the Burt table. If f is the sum of all elements in the Burt table Z'Z, then fn-2 is the number of rows in the binary matrix Z. The sum of all elements in each diagonal subtable of the Burt table must be fn-2.

To enter supplementary observations, include a WEIGHT statement with negative weights for those observations. Specify the SUPPLEMENTARY statement to include supplementary variables. You must list supplementary variables in both the VAR and SUPPLEMENTARY statements.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.