genscat | Generalized scatterplot matrix | genscat |
The GENSCAT macro produces generalized scatterplot matrix for all pairs of variables, which may be categorical or numeric (Friendly, 1999). For pairs consisting of two numeric variables, an ordinary scatterplot is produced; pairs of two categorical variables are shown by a mosaic plot; pairs of one categorical and one numeric variable are shown by boxplots.
The GENSCAT macro is defined with keyword parameters. The arguments may be listed within parentheses in any order, separated by commas. For example:
%genscat(data=test, var=X1 X2 Group Sex, group=gp);
DATA=_LAST_
]
VAR=_NUMERIC_
]
VAR=
used to override the default treatment of numeric variables:
a list of C and N.
INTERP=NONE
]
SYMBOLS=%STR(CIRCLE SQUARE + : $ = X _ Y)
]
COLORS=BLUE RED GREEN BROWN BLACK YELLOW ORANGE PURPLE
]
ANNO=BOX
adds a boxplot
to diagonal plots, ANNO=ELLIPSE
adds a data ellipse to off-diagonal
plots for pairs of numeric variables. [Default: ANNO=NONE
]
GTEMP=GTEMP
]
KILL=Y
]
GOUT=GSEG
]
GOUT=GENSCAT
]
GENSCAT requires the following macros:
gdispla gensym boxaxis contour table mosaic boxplot panels
Friendly, M. ``Extending Mosaic Displays: Marginal, Conditional, and Partial Views of Categorical Data'', JCGS, 8:373-395, 1999. ../papers/drew/drew.pdf
%include macros(genscat); *-- or include in an autocall library; data test; drop i; do sex='Male ', 'Female'; do i=1 to 50; gp = rantbl(0, .25, .35, .15, .25); group = substr('ABCD', gp,1); x1 = round( 80*uniform(0)) - 5*gp; x2 = round( 80*uniform(0)) + x1 - 50 + 5*gp; output; end; end; run; %genscat(data=test, var=X1 X2 Group Sex, group=gp);