Learn R Programming

vcd (version 1.4-4)

struc_sieve: Core-generating Function for Sieve Plots

Description

Core-generating function for strucplot returning a function producing sieve plots.

Usage

struc_sieve(sievetype = c("observed","expected"), gp_tile = gpar(),
scale = 1)

Arguments

sievetype

logical indicating whether rectangles should be filled according to observed or expected frequencies.

gp_tile

object of class "gpar", controlling the appearance of all static elements of the cells (e.g., border and fill color).

scale

Scaling factor for the sieve.

Value

A function with arguments:

residuals

table of residuals.

observed

table of observed values.

expected

not used by struc_sieve.

spacing

object of class "unit" specifying the space between the tiles.

gp

list of gpar objects used for the drawing the tiles.

split_vertical

vector of logicals indicating, for each dimension of the table, the split direction.

Details

This function is usually called by strucplot (typically when called by sieve) and returns a function used by strucplot to produce sieve plots.

References

Riedwyl, H., and Sch<U+00FC>pbach, M. (1994), Parquet diagram to plot contingency tables. In F. Faulbaum (ed.), Softstat '93: Advances in Statistical Software, 293--299. Gustav Fischer, New York.

Friendly, M. (2000), Visualizing Categorical Data, SAS Institute, Cary, NC.

Meyer, D., Zeileis, A., and Hornik, K. (2006), The strucplot framework: Visualizing multi-way contingency tables with vcd. Journal of Statistical Software, 17(3), 1-48. URL http://www.jstatsoft.org/v17/i03/ and available as vignette("strucplot").

See Also

sieve, strucplot, structable

Examples

Run this code
# NOT RUN {
## Titanic data
data("Titanic")
strucplot(Titanic, core = struc_sieve)
# }

Run the code above in your browser using DataLab