doubledecker               package:vcd               R Documentation

_D_o_u_b_l_e_d_e_c_k_e_r _P_l_o_t

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

     This function creates a doubledecker plot visualizing a
     classification rule.

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

     ## S3 method for class 'formula':
     doubledecker(formula, data = NULL, ..., main = NULL)
     ## Default S3 method:
     doubledecker(x, depvar = length(dim(x)),
       margins = c(1,4, length(dim(x)) + 1, 1),
       col = rainbow_hcl(tail(dim(x), 1), end = 260),
       labeling = labeling_doubledecker,
       spacing = spacing_highlighting,
       main = NULL, keep_aspect_ratio = FALSE, ...)

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

 formula: a formula specifying the variables used to create a 
          contingency table from 'data'. The dependent variable is used
          last for splitting.

    data: either a data frame, or an object of class '"table"' or
          '"ftable"'.

       x: a contingency table in array form, with optional category
          labels specified in the 'dimnames(x)' attribute.

  depvar: dimension index or character string specifying the dependent
          variable.  That will be sorted last in the table.

 margins: margins of the plot.  Note that by default, all factor names
          (except the last one) and their levels are visualized _as a
          block_ under the plot.

     col: vector of colors used for the tiles of the last variable.

labeling: labeling function or corresponding generating generating
          function (see 'strucplot' for details).

 spacing: spacing object, spacing function or corresponding generating
          function (see 'strucplot' for details).

    main: either a logical, or a character string used for plotting the
          main title.  If 'main' is 'TRUE', the name of the 'data'
          object is used.

keep_aspect_ratio: logical indicating whether the aspect ratio should
          be maintained or not.

     ...: Further parameters passed to 'mosaic'.

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

     Doubledecker plots visualize the the dependence of one categorical
     (typically binary) variable on further categorical variables. 
     Formally, they are mosaic plots with vertical splits for all
     dimensions (antecedents) except the last one, which represents the
     dependent variable (consequent).  The last variable is visualized
     by horizontal splits, no space between the tiles, and separate
     colors for the levels.

_V_a_l_u_e:

     The '"structable"' visualized is returned invisibly.

_A_u_t_h_o_r(_s):

     David Meyer David.Meyer@R-project.org

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

     H. Hoffmann (2001), Generalized odds ratios for visual modeling.
     _Journal of Computational and Graphical Statistics_, *10*, 4,
     628-640.

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

     'strucplot', 'mosaic'

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

     doubledecker(Titanic)
     doubledecker(Titanic, depvar = "Survived")
     doubledecker(Survived ~ ., data = Titanic)

