plot.acomp           package:compositions           R Documentation

_D_i_s_p_l_a_y_i_n_g _c_o_m_p_o_s_i_t_i_o_n_s _i_n _t_e_r_n_a_r_y _d_i_a_g_r_a_m_s

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

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

     ## S3 method for class 'acomp':
     plot(x,...,labels=colnames(X),cn=colnames(X),aspanel=FALSE,id=FALSE,idlabs=NULL,idcol=2,center=FALSE,scale=FALSE,pca=FALSE,col.pca=par("col"),margin="acomp",add=FALSE,triangle=!add,col=par("col"))
     ## S3 method for class 'rcomp':
     plot(x,...,labels=colnames(X),cn=colnames(X),aspanel=FALSE,id=FALSE,idlabs=NULL,idcol=2,center=FALSE,scale=FALSE,pca=FALSE,col.pca=par("col"),margin="rcomp",add=FALSE,col=par("col"))
               

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

       x: a dataset of a compositional class

     ...: further graphical parameters passed (see 'par')

  margin: The type of marginalisation to be computed, when displaying
          the individual panels. Possible values are: '"acomp"',
          '"rcomp"' and any of the variable names/column numbers in the
          composition. If one of the columns is selected each panel
          displays a subcomposition given by the row part, the column
          part and the given part. If one of the classes is given the
          corresponding margin 'acompmargin'  or  'rcompmargin' is
          used. 

     add: a logical indicating whether the information should just be
          added to an existing plot. In case of false a new plot is
          created.

triangle: A logical indicating whether the triangle should be drawn. 

     col: The color to plot the data.

  labels: The names of the parts

      cn: The names of the parts to be used in a single panel. Internal
          use only.

 aspanel: Logical indicating that only a single panel should be drawn
          and not the whole plot. Internal use only.

      id: A logical. If true one can identify the points like with the
          'identify' command. 

  idlabs: A character vector providing the labels to be used with the
          identification, when 'id=TRUE'

   idcol: color of the idlabs-labels

  center: a logical indicating whether a the data should be centered
          prior to the plot. Centering is done in the choosen
          philosophy. See 'scale'

   scale: a logical indicating whether a the data should be scaled
          prior to the plot. Scaling is done in the choosen philosophy.
          See 'scale'

     pca: A logical indicating whether the first principle component
          should be displayed in the plot. Currently direction of the
          principle component of the displayed subcomposition is
          displayed as a line. Later on a the principle componenent of
          the whole dataset should be displayed.

 col.pca: The color to draw the principle component.

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

     The data is displayed in ternary diagrams. This does not work for
     two part compositions. Compositions of three parts are displayed
     in a single ternary diagram. For compositions of more than three
     components, the data is arrange in a scatterplot matrix through
     the command 'pairs'. 
      The third component in each of the panels is than choosen
     according to setting of 'margin='. Possible values of 'margin='
     are: '"acomp"', '"rcomp"' and any of the variable names/column
     numbers in the composition. If one of the columns is selected each
     panel displays a subcomposition given by the row part, the column
     part and the given part. If one of the classes is given the
     corresponding margin 'acompmargin'  or  'rcompmargin' is used. 
      Ternary diagrams can be read in multiple ways. Each corner of the
     triangle corresponds to a composition only containing the single
     part displayed in that corner. Points on the edges correspond to
     compositions only containing the parts in the adjacent corners.
     The relative amounts are displayed by the distance to the opposite
     corner. The individual portions of general points can be infered
     by imaginatorily drawing a line parallel to the edge opposite to
     the corner of the part of interest through the point. The portion
     of the part of intrest is constant along the line. Thus we can
     read it  on both crossing points of the line with the edges. 
      Relative portions of two parts can be inferred by imaginatorily
     drawing a line through the point and the corner of the unimportant
     component. This line intersects the edge between the two
     components of interest in the composition with the same relative
     portion of the two remaining components. 
      Exactly the lines parallel to one of the edges or going through
     one of the corners are straight lines as well in Aitchison and as
     in real geometry. They remain straight under an arbitrary
     perturbation.

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

     Aitchison, J. (1986) _The Statistical Analysis of Compositional
     Data_ Monographs on Statistics and Applied Probability. Chapman &
     Hall Ltd., London (UK). 416p.

     Aitchison, J, C. Barcel'o-Vidal, J.J. Egozcue, V. Pawlowsky-Glahn
     (2002) A consise guide to the algebraic geometric structure of the
     simplex, the sample space for compositional data analysis, _Terra
     Nostra_, Schriften der Alfred Wegener-Stiftung, 03/2003

     Billheimer, D., P. Guttorp, W.F. and Fagan (2001) Statistical
     interpretation of species composition, _Journal of the American
     Statistical Association_, *96* (456), 1205-1214

     Pawlowsky-Glahn, V. and J.J. Egozcue (2001) Geometric approach to
     statistical analysis on the simplex. _SERRA_ *15*(5), 384-398

     <URL: http://ima.udg.es/Activitats/CoDaWork03>

     <URL: http://ima.udg.es/Activitats/CoDaWork05>

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

     'plot.aplus', 'qqnorm.acomp','boxplot.acomp'

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

     data(SimulatedAmounts)
     plot(acomp(sa.lognormals))
     plot(rcomp(sa.lognormals))
     plot(acomp(sa.lognormals5),pca=TRUE)
     plot(rcomp(sa.lognormals5),pca=TRUE)

