quadplot                package:klaR                R Documentation

_P_l_o_t_t_i_n_g _o_f _4 _d_i_m_e_n_s_i_o_n_a_l _m_e_m_b_e_r_s_h_i_p _r_e_p_r_e_s_e_n_t_a_t_i_o_n _s_i_m_p_l_e_x

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

     For a 4 class discrimination problem the membership values of each
     class are visualized in a 3 dimensional barycentric coordinate
     system.

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

     quadplot(e = NULL, f = NULL, g = NULL, h = NULL, angle = 75, 
         scale.y = 0.6, label = 1:4, labelcol = rainbow(4), 
         labelpch = 19, labelcex = 1.5, main = "", s3d.control = list(), 
         simplex.control = list(), legend.control = list(), ...)

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

       e: either a matrix with 4 columns represanting the membership
          values or a  vector with the membership values of the first
          class

       f: vector with the membership values of the second class

       g: vector with the membership values of the third class

       h: vector with the membership values of the forth class

   angle: angle between x and y axis 

 scale.y: scale of y axis related to x- and z axis

   label: label for the classes 

labelcol: colors to use for the labels

labelpch: 'pch' for the labels

labelcex: 'cex' for the labels

    main: main title of the plot

s3d.control: a _list_ with further arguments passed to the underlying 
          'scatterplot3d' function call that sets up the plot

simplex.control: a _list_ with further arguments passed to the
          underlying  function call that draws the barycentric
          coordinate system

legend.control: a _list_ with further arguments passed to the
          underlying  function call that adds the 'legend'

     ...: further arguments passed to the underlying 'plot' function
          that draws the data points

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

     The membership values are calculated with 'quadtrafo' and plotted 
     with 'scatterplot3d'.

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

     A 'scatterplot3d' object.

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

     Karsten Luebke, luebke@statistik.uni-dortmund.de, and Uwe Ligges

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

     Garczarek, Ursula Maria (2002): Classification rules in
     standardized partition spaces. Dissertation, University of
     Dortmund.  URL <URL:
     http://eldorado.uni-dortmund.de:8080/FB5/ls7/forschung/2002/Garcza
     rek>

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

     'triplot', 'scatterplot3d'

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

     library("MASS")
     data(B3)
     opar <- par(mfrow = c(1, 2), pty = "s")
     posterior <- predict(lda(PHASEN ~ ., data = B3))$post
     s3d <- quadplot(posterior, col = rainbow(4)[B3$PHASEN], 
             labelpch = 22:25, labelcex = 0.8,
             pch = (22:25)[apply(posterior, 1, which.max)], 
             main = "LDA posterior assignments")
     quadlines(centerlines(4), sp = s3d, lty = "dashed")

     posterior <- predict(qda(PHASEN ~ ., data = B3))$post
     s3d <- quadplot(posterior, col = rainbow(4)[B3$PHASEN], 
             labelpch = 22:25, labelcex = 0.8,
             pch = (22:25)[apply(posterior, 1, which.max)],
             main = "QDA posterior assignments")
     quadlines(centerlines(4), sp = s3d, lty = "dashed")
     par(opar)

