Mosaics: Options

The SAS/IML Mosaics program has a large number of options controlling the series of models fit to a frequency table and how the residuals from this model are display in the series of mosaics. Only some of these are made accessible through this Web interface. See the Mosaics User's Guide for further information.

Analysis Options

Residual Type {GF | LR | FT}
Specifies the type of deviations (residuals) to be represented by shading.
calculates components of Pearson goodness of fit chisquare, where m hat ij is the estimated expected frequency under the model.
calculates components of the Likelihood Ratio (deviance) chisquare,
calculates Freeman-Tukey residuals,

specifies the type of sequential log-linear models to fit. For two-way tables, (or two-way margins of larger tables) all fittypes fit the independence model.
specifies sequential models of joint independence, [A][B] , [AB][C] , [ABC][D] , ... These models specify that the last variable in a given plot is independent of all previous variables jointly.
specifies sequential models of mutual independence, [A][B] , [A][B][C] , [A][B][C][D] , ...
specifies sequential models of conditional independence which hypothesize that all previous variables are independent, given the last, i.e., [A][B] , [AC][BC] , [ A D ] [ B D ] [ C D] , ... For the 3-way model, A and B are hypothesized to be conditionally independent, given C; for the 4-way model, A, B, and C are conditionally independent, given D.
specifies sequential models of partial independence of the first pair of variables, conditioning on all remaining variables one at a time: [A][B] , [AC][BC] , [ A C D ] [ B C D ] , ... For the 3-way model, A and B are hypothesized to be conditionally independent, given C; for the 4-way model, A and B are conditionally independent, given C and D.
specifies a sequential series of Markov chain models fit to the table, whose dimensions are assumed to represent discrete ordered time points, such as lags in a sequential analysis. Such models assume that the table dimensions are ordered in time, e.g., Lag0, Lag1, Lag2, ...

MARKOV (or MARKOV1) fits the models [A][B] , [AB] [BC], [AB] [BC] [CD]. ...

Variable Order
This text field can be used to reorder the variables after the data has been read in, in order to rearrange their order of entry into the mosaic displays. For two-way tables, this choice determines the appearance of the mosaics (which dimension is subdivided first), but not the fitted model or the residuals. For three- and higher-way tables this choice determines the models that are fit to the three- and higher-way marginal (sub) tables, since the mosaic displays always use the factor variables in order.

The default from data indeicates that the variables are ordered based on the order of occurrence of the levels in the dataset, as explained in "How should my data be setup? To reorder the variables, enter either

For example, for the sample data of Hair Color x Eye Color x Sex you can rearrange the variables in the order Sex, Hair, Eye by entering either of the lines below in this field:

sex hair eye
3   1    2
Level Order
This option only applies when the variables themselves are being reordered, since there are two different ways this can be done:
  1. from data means that the values of a factor are maintained in the same order as they occur in the dataset.
  2. by value means that the values of a factor are sorted into increasing order.
For example, consider the two-way Hair, Eye color data, where the first few data lines are:

Black    Brown      68
Brown    Brown     119
Red      Brown      26
Blond    Brown       7
If the variables are rearranged and you choose from data, the levels of Hair Color will remain in the order in they appear in the data -- Black, Brown, Red, Blond (ordered by hair darkness). If you choose by value, the levels of Hair Color will be sorted alphabetically -- Black, Blond, Brown, Red -- probably not what you want!

Display Options

Fill Type {M45 | LR | M0 | GRAY | HLS}
specifies the type of fill pattern to use for shading.
uses SAS/GRAPH patterns MdN135 and Md45 with hatching at 45 and 135°. d is the density value determined from the residual and the shade parameter.
uses SAS/GRAPH patterns Ld and Rd.
uses SAS/GRAPH patterns MdN0 and MdN90 with hatching at 0 and 90°. step
uses solid, greyscale fill using the patterns GRAY nn starting from GRAYF0 for density=1 and increasing darkness by step for each successive density level.
uses solid, color-varying fill based on the HLS color scheme. The colors are selected attempting to vary the lightness in approximately equal steps. For this option, the colors values must be selected from the following hue names: RED GREEN BLUE MAGENTA CYAN YELLOW.
Text Height
is a numeric value which specifies the height of text labels, in percent. The program attempts to avoid overlap of category labels, but this cannot always be achieved. Adjust htext (or make the labels shorter) if they collide.
Split directions
is a character vector consisting of the letters V and H which specifies the directions in which the variables divide the unit square of the mosaic display. If split={H V} , the mosaic alternates between Horizontal and Vertical splitting. If the number of elements in split is less than the maximum number in plots, the elements in split are reused cyclically.