ellipses            package:compositions            R Documentation

_D_r_a_w _e_l_l_i_p_s_e_s

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

     Draws ellipses from a mean and a variance into a plot.

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

               ellipses(mean,...)
               ## S3 method for class 'acomp':
               ellipses(mean,var,r=1,...,steps=360)
               ## S3 method for class 'rcomp':
               ellipses(mean,var,r=1,...,steps=360)
               ## S3 method for class 'aplus':
               ellipses(mean,var,r=1,...,steps=360)
               ## S3 method for class 'rplus':
               ellipses(mean,var,r=1,...,steps=360)
               ## S3 method for class 'rmult':
               ellipses(mean,var,r=1,...,steps=360)
               

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

    mean: a dataset/value of means or midpoints of the ellipses

     var: a variance matrix or a set of variance matrices given by
          'var[i,,]'. The principle axis of the variance give the axis
          of the ellipses. The the square-root of the eigenvalues times
          r give the large and small halfdiameter of the ellipse.

       r: A scaling of the radius 

     ...: further graphical parameters

   steps: the numer of discretisation points to draw the ellipses.

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

     The ellipse drawn is given by the solutions of

                    (x-mean)^tvar^{-1}(x-mean)=r^2

     in the respective geometry of the parameter space. Currently the
     compositional scales (acomp and rcomp) can be used only for three
     part compositions and plot into a ternary diagram and the not sum
     constrained scales (aplus, rplus and rmult) can only be used with
     two parts and draw into any scatterplot. 
      TODO: Adding to multi-panel plots

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

     'plot.acomp',

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

     data(SimulatedAmounts)

     plot(acomp(sa.lognormals))
     tt<-acomp(sa.lognormals); ellipses(mean(tt),var(tt),r=2,col="red")
     tt<-rcomp(sa.lognormals); ellipses(mean(tt),var(tt),r=2,col="blue")

     plot(aplus(sa.lognormals[,1:2]))
     tt<-aplus(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="red")
     tt<-rplus(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="blue")

     plot(rplus(sa.lognormals[,1:2]))
     tt<-aplus(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="red")
     tt<-rplus(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="blue")
     tt<-rmult(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="green")

