endpointCoordinates       package:compositions       R Documentation

_A_m_o_u_n_t_s _i_n _b_a_r_y_t_i_c-_c_o_o_r_d_i_n_a_t_e_s

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

     Computes the convex combination of amounts given by 'endpoints' to
     explain 'X' as good as possible.

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

               endpointCoordinates(X,...)
               endpointCoordinatesInv(K,endpoints,...)
               ## Default S3 method:
               endpointCoordinates(X,endpoints=diag(gsi.getD(X)), ...)
               ## S3 method for class 'acomp':
               endpointCoordinates(X,endpoints=clr.inv(diag(gsi.getD(X))),...)
               ## S3 method for class 'aplus':
               endpointCoordinates(X,endpoints,...)
               ## S3 method for class 'rplus':
               endpointCoordinates(X,endpoints,...)
               ## S3 method for class 'rmult':
               endpointCoordinatesInv(K,endpoints,...)
               ## S3 method for class 'acomp':
               endpointCoordinatesInv(K,endpoints,...)
               ## S3 method for class 'rcomp':
               endpointCoordinatesInv(K,endpoints,...)
               ## S3 method for class 'aplus':
               endpointCoordinatesInv(K,endpoints,...)
               ## S3 method for class 'rplus':
               endpointCoordinatesInv(K,endpoints,...)
               

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

       X: a dataset of amounts or compositions, to be represented in as
          convex combination of the endpoints in the given geometry

       K: Konvex combination weights to the endpoints

endpoints: a dataset of extremal compositions from the same space as X.
          The number of endpoints given must not exceed the dimension
          of the space plus one.

     ...: currently unused

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

     The convex combination is performed in the respective geometry.
     This means that for rcomp positivity of the result is only
     guaranteed with extermal endmembers and that in acomp-geometry it
     is not possible to give extremal endmembers.   
      The main idea behind this functions is that the actually observed
     composition came from a convex combination of some extremal
     compositions specified by endpoints. Strictly speaking this is
     meaningfull in strictly this sense only in rplus-geometry and
     under some special circumstances in rcomp geometry. It is not
     meaningfull in terms of mass conservation in acomp- and
     aplus-geometry due to the non mass-balancing character of the
     geometry. In rcomp-geometry it dependent on unit of measurements
     and different for volume and mass % and only valid if the whole
     composition is observed.

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

     The 'endpointCoordinates' functions give a '"rmult"'-dataset
     giving the convex weights, which allow to combine 'X' from
     'endpoints' as good as possible. The result is an '"rmult"' since
     there is guarantee that the resulting weights are positive. 
      The 'endpointCoordinates' functions reconstruct the convex
     combination from coordinates 'K' and the given 'endpoints'. The
     class of 'endpoints' determines the geometry chosen and the class
     of the result.

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

     Shurtz, Robert F., 2003. Compositional geometry and mass
     conservation. Mathematical Geology 35~(8), 972-937.

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

     data(SimulatedAmounts)
     ep <- aplus(rbind(c(2,1,2),c(2,2,1),c(1,2,2)))
     dat <- endpointCoordinatesInv(acomp(sa.lognormals),acomp(ep))
     plot(dat)
     plot( acomp(endpointCoordinates(dat,acomp(ep))))

     dat <- endpointCoordinatesInv(rcomp(sa.lognormals),rcomp(ep))
     plot(dat)
     plot( rcomp(endpointCoordinates(dat,rcomp(ep))))

     dat <- endpointCoordinatesInv(aplus(sa.lognormals),aplus(ep))
     plot(dat)
     plot( endpointCoordinates(dat,aplus(ep)))

     dat <- endpointCoordinatesInv(rplus(sa.lognormals),rplus(ep))
     plot(dat)
     plot(endpointCoordinates(rplus(dat),rplus(ep)))

