Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The CORRESP Procedure

Using the TABLES Statement

In the following TABLES statement, each variable list consists of a single variable:

   proc corresp data=Neighbor dimens=1 observed short;
      ods select observed;
      tables Sex, Age;
   run;

These statements create a contingency table with two rows (Female and Male) and two columns (Old and Young) and show the neighbors broken down by age and sex. The DIMENS=1 option overrides the default, which is DIMENS=2. The OBSERVED option displays the contingency table. The SHORT option limits the displayed output. Because it contains missing values, the observation where Name='Igor' is omitted from the analysis. Figure 24.4 displays the contingency table.

 
The CORRESP Procedure

Contingency Table
  Old Young Sum
Female 2 2 4
Male 4 3 7
Sum 6 5 11
Figure 24.4: Contingency Table for Sex, Age

The following statements create a table with six rows (Blond*Short, Blond*Tall, Brown*Short, Brown*Tall, White*Short, and White*Tall), and four columns (Female, Male, Old, and Young). The levels of the row variables are crossed, forming mutually exclusive categories, whereas the categories of the column variables overlap.

   proc corresp data=Neighbor cross=row observed short;
      ods select observed;
      tables Hair Height, Sex Age;
   run;

 
The CORRESP Procedure

Contingency Table
  Female Male Old Young Sum
Blond * Short 1 1 1 1 4
Blond * Tall 0 1 0 1 2
Brown * Short 1 1 2 0 4
Brown * Tall 1 3 1 3 8
White * Short 0 1 1 0 2
White * Tall 1 0 1 0 2
Sum 4 7 6 5 22
Figure 24.5: Contingency Table for Hair Height, Sex Age

You can enter supplementary variables with TABLES input by including a SUPPLEMENTARY statement. Variables named in the SUPPLEMENTARY statement indicate TABLES variables with categories that are supplementary. In other words, the categories of the variable Age are represented in the row and column space, but they are not used in determining the scores of the categories of the variables Hair, Height, and Sex. The variable used in the SUPPLEMENTARY statement must be listed in the TABLES statement as well. For example, the following statements create a Burt table with seven active rows and columns (Blond, Brown, White, Short, Tall, Female, Male) and two supplementary rows and columns (Old and Young).

   proc corresp data=Neighbor observed short mca;
      ods select burt supcols;
      tables Hair Height Sex Age;
      supplementary Age;
   run;

 
The CORRESP Procedure

Burt Table
  Blond Brown White Short Tall Female Male
Blond 3 0 0 2 1 1 2
Brown 0 6 0 2 4 2 4
White 0 0 2 1 1 1 1
Short 2 2 1 5 0 2 3
Tall 1 4 1 0 6 2 4
Female 1 2 1 2 2 4 0
Male 2 4 1 3 4 0 7
 
Supplementary Columns
  Old Young
Blond 1 2
Brown 3 3
White 2 0
Short 4 1
Tall 2 4
Female 2 2
Male 4 3
Figure 24.6: Burt Table from PROC CORRESP

The following statements create a binary table with 7 active columns (Blond, Brown, White, Short, Tall, Female, Male), 2 supplementary columns (Old and Young), and 11 rows for the 11 observations with nonmissing values.

   proc corresp data=Neighbor observed short binary;
      ods select binary supcols;
      tables Hair Height Sex Age;
      supplementary Age;
   run;

 
The CORRESP Procedure

Binary Table
  Blond Brown White Short Tall Female Male
1 0 0 1 1 0 0 1
2 0 1 0 0 1 1 0
3 0 1 0 1 0 0 1
4 0 0 1 0 1 1 0
5 0 1 0 1 0 1 0
6 1 0 0 0 1 0 1
7 0 1 0 0 1 0 1
8 1 0 0 1 0 0 1
9 1 0 0 1 0 1 0
10 0 1 0 0 1 0 1
11 0 1 0 0 1 0 1
 
Supplementary Columns
  Old Young
1 1 0
2 0 1
3 1 0
4 1 0
5 1 0
6 0 1
7 0 1
8 1 0
9 0 1
10 1 0
11 0 1
Figure 24.7: Binary Table from PROC CORRESP

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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