struc_assoc               package:vcd               R Documentation

_C_o_r_e-_g_e_n_e_r_a_t_i_n_g _F_u_n_c_t_i_o_n _f_o_r _A_s_s_o_c_i_a_t_i_o_n _P_l_o_t_s

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

     Core-generating function for 'strucplot' returning a function
     producing association plots.

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

     struc_assoc(compress = TRUE, xlim = NULL, ylim = NULL,
       yspace = unit(0.5, "lines"), xscale = 0.9, gp_axis = gpar(lty = 3))

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

compress: logical; if 'FALSE', the space between the rows (columns) are
          chosen such that the _total_ heights (widths) of the rows
          (column) are all equal.  If 'TRUE', the space between the
          rows and columns is fixed and hence the plot is more
          "compressed".

    xlim: either a 2 x k matrix of doubles, k the number of total
          columns of the plot, or a recycled vector from which such a
          matrix will be constructed. The columns of 'xlim' correspond
          to the columns of the association plot, the rows describe the
          column ranges (minimums in the first row, maximums in the
          second row). If 'xlim' is 'NULL', the ranges are determined
          from the residuals according to 'compress' (if 'TRUE': widest
          range from each column, if 'FALSE': from the whole
          association plot matrix).

    ylim: either a 2 x k matrix of doubles, k the number of total rows
          of the plot, or a recycled vector from which such a matrix
          will be constructed. The columns of 'ylim' correspond to the
          rows of the association plot, the rows describe the column
          ranges (minimums in the first row, maximums in the second
          row). If 'ylim' is 'NULL', the ranges are determined from the
          residuals according to 'compress' (if 'TRUE': widest range
          from each row, if 'FALSE': from the whole association plot
          matrix).

  xscale: scale factor resizing the tile's width, thus adding
          additional space between the tiles. 

  yspace: object of class '"unit"' specifying additional space
          separating the rows.

 gp_axis: object of class '"gpar"' specifying the visual aspects of the
          tiles' baseline.

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

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

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

     A function with arguments: 

residuals: table of residuals.

observed: not used by 'struc_assoc'.

expected: table of expected frequencies.

 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.

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

     David Meyer David.Meyer@R-project.org

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

     Cohen, A. (1980), On the graphical display of the significant
     components in a two-way contingency table. _Communications in
     Statistics-Theory and Methods_, *A9*, 1025-1041.

     Friendly, M. (1992), Graphical methods for categorical data. _SAS
     User Group International Conference Proceedings_, *17*, 190-200.
     <URL: http://www.math.yorku.ca/SCS/sugi/sugi17-paper.html>

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

     'assoc', 'strucplot', 'structable'

