agreementplot.default          package:vcd          R Documentation

_B_a_n_g_d_i_w_a_l_a'_s _O_b_s_e_r_v_e_r _A_g_r_e_e_m_e_n_t _C_h_a_r_t

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

     Representation of a k x k confusion matrix, where the observed and
     expected diagonal elements are represented by superposed black and
     white rectangles, respectively. The function also computes a
     statistic measuring the strength of agreement (relation of
     respective area sums).

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

     ## Default S3 method:
     agreementplot(x, reverse.y = TRUE, main = "Agreement Chart",
                   weights = c(1, 1 - 1/(ncol(x) - 1)^2), cex.main = 2, cex.lab = 1.5,
                   xlab = names(dimnames(x))[2], ylab = names(dimnames(x))[1], ...)
     ## S3 method for class 'formula':
     agreementplot(formula, data = NULL, ..., subset)

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

       x: a confusion matrix, i.e. a table with equal-sized dimensions.

reverse.y: if 'TRUE', the y axis is reversed (i.e., the rectangles'
          positions correspond to the contingency table).

    main: user-specified main title.

 weights: vector of weights for successive larger observed areas, used
          in the agreement strength statistic, and also for the
          shading. The first element should be 1.

cex.main: font size of title.

 cex.lab: font size of labels.

xlab, ylab: labels of x- and y-axis.

 formula: a formula, such as 'y ~ x'. For details, see 'xtabs'.

    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.

     ...: further graphics parameters (see 'par').

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

     Weights can be specified to allow for partial agreement, taking
     into account contributions from off-diagonal cells. A weight
     vector of length 1 means strict agreement only, each additional
     element increases the maximum number of disagreement steps.

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

     Invisibly returned, a list with components 

Bangdiwala: the unweighted agreement strength statistic

Bangdiwala.Weighted: the weighted statistic

 weights: the weigtht vector used.

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

     David Meyer
      david.meyer@ci.tuwien.ac.at

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

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

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

     data(SexualFun)
     agreementplot(t(SexualFun))

     data(MSPatients)
     ## Enlarge plot manually or use sth. like: X11(width = 12)!
     par(mfrow = c(1,2))
     agreementplot(t(MSPatients[,,1]), main = "Winnipeg Patients")
     agreementplot(t(MSPatients[,,2]), main = "New Orleans Patients")
     par(mfrow = c(1,1))

