Chapter Contents |
Previous |
Next |
The CORRESP Procedure |
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 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;
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 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;
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.