|mosaic||Macro interface for mosaic displays||mosaic|
The MOSAIC macro may be used with any SAS data set in frequency form (e.g., the output from PROC FREQ). The macro simply creates the PROC IML step, reads the input data set, and runs the either the mosaic module, the mosaicd module, or the mospart module, depending on the options specified. If your data is in case form, just use PROC FREQ first to construct the contingency table.
Ordinarily, the program fits a model (specified by the
parameter) and displays residuals from this model in the mosaic for each
marginal subtable specified by the
PLOTS= parameter. However, if you have already fit a model and calculated
residuals some other way (e.g., using PROC CATMOD or PROC GENMOD), specify
a RESID= variable in the macro call. The macro will then call the mosaicd module.
If a BY= variable is specified, the macro produces one (partial) mosaic plot for
each level of the
V1-V3) are not allowed. The levels of the factor variables may be character or numeric, but are used `as is' in the input data. You may omit the VAR= variables if variable names are used in the VORDER= parameter.
variable(s)*must* be listed among the VAR= variables.
config=1 2 / 1 3 / 2 3or (using variable names)
config = A B / A C / B CNote that the numbers refer to the variables after they have been reordered, either sorting the data set, or by the VORDER= parameter.
SORT=YESsorts the data in the reverse order that they are listed in the VAR= paraemter, so that the variables are entered in the order given in the VAR= parameter. Otherwise, SORT= lists the variable names, possibly with the DESENDING or NOTSORTED options in the reverse of the desired order. e.g.,
SORT=C DESCENDING B DESCENDING A. The default is
SORT=YES, unless VORDER= has been specified.
%include vcd(mosaic); *-- or include in an autocall library; %mosaic();