mosaicpairs               package:vcd               R Documentation

_M_o_s_a_i_c _M_a_t_r_i_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Plots matrices of mosaics.

_U_s_a_g_e:

     ## Default S3 method:
     mosaicpairs(x, main = deparse(substitute(x)),
                 xlab = NULL, ylab = NULL, labels, ...,
                 type = c("pairwise", "total", "conditional", "joint"),
                 shade = TRUE, oma = NULL, cex.labels = NULL, label.pos = 0.5,
                 font.labels = 1, gap = 1)
     ## S3 method for class 'formula':
     mosaicpairs(formula, data = NULL, ..., main, subset)

_A_r_g_u_m_e_n_t_s:

       x: a contingency table in array form, with optional category
          labels specified in the 'dimnames(x)' attribute.  The table
          is best created by the 'table()' command.

    main: character string for the mosaic title.

xlab,ylab: x- and y-axis labels used for the plot; by default, the
          first and second element of 'names(dimnames(X))' (i.e., the
          name of the first and second variable in 'X').

  labels: the names of the variables.

     ...: further parameters (_currently not used_).

    type: a character string indicating the type of mosaic matrix, see
          details for more information.

   shade: a logical indicating whether to produce extended mosaic
          plots, or a numeric vector of at most 5 distinct positive
          numbers giving the absolute values of the cut points for the
          residuals.  By default, 'shade' is 'TRUE'.  Using 'shade =
          TRUE' cuts absolute values at 2 and 4.

     oma: A vector of the form c(bottom, left, top, right) giving the
          size of the outer margins in lines of text.

cex.labels, font.labels: graphics parameters for the text panel.

label.pos: y position of labels in the text panel.

     gap: distance between subplots, in margin lines.

 formula: a formula, such as 'y ~ x'.

    data: a data.frame (or list), or a contingency table from which the
          variables in 'formula' should be taken.

  subset: an optional vector specifying a subset of observations to be
          used for plotting.

_D_e_t_a_i_l_s:

     'mosaicpairs()' plots a matrix of pairwise mosaic plots, four
     independence types are distinguished: '"pairwise"', '"total"',
     '"conditional"' and '"joint"'. The pairwise mosaic matrix shows
     bivariate marginal relations, collapsed over all other variables.
     The total independence mosaic matrix shows mosaic plots for mutual
     independence, i.e. for marginal and conditional independence among
     all pairs of variables. The conditional independence mosaic matrix
     shows mosaic plots for marginal independence given all other
     variables. The joint independence mosaic matrix shows mosaic plots
     for joint independence of all pairs of variables from the others.

_R_e_f_e_r_e_n_c_e_s:

     M. Friendly (2000), _Visualizing Categorical Data_. SAS Institute,
     Cary, NC.

_S_e_e _A_l_s_o:

     'mosaicplot', 'pairs'.

_E_x_a_m_p_l_e_s:

     data(UCBAdmissions)
     data(PreSex)

     mosaicpairs(PreSex, shade = TRUE)
     mosaicpairs(UCBAdmissions, shade = TRUE)
     mosaicpairs(UCBAdmissions, shade = TRUE, type="conditional")

