cdt               package:compositions               R Documentation

_C_e_n_t_e_r_e_d _d_e_f_a_u_l_t _t_r_a_n_s_f_o_r_m

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

     Compute the centered default transform of a (data set of)
     compositions or amounts (or its inverse).

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

               cdt(x,...)
               ## Default S3 method:
               cdt( x ,...)
               ## S3 method for class 'acomp':
               cdt( x ,...)
               ## S3 method for class 'rcomp':
               cdt( x ,...)
               ## S3 method for class 'aplus':
               cdt( x ,...)
               ## S3 method for class 'rplus':
               cdt( x ,...)
               ## S3 method for class 'rmult':
               cdt( x ,...)
               ## S3 method for class 'factor':
               cdt( x ,...)
               cdt.inv(x,orig,...)
               ## Default S3 method:
               cdt.inv( x ,orig,...)
               ## S3 method for class 'acomp':
               cdt.inv( x ,orig,...)
               ## S3 method for class 'rcomp':
               cdt.inv( x ,orig,...)
               ## S3 method for class 'aplus':
               cdt.inv( x ,orig,...)
               ## S3 method for class 'rplus':
               cdt.inv( x ,orig,...)
               ## S3 method for class 'rmult':
               cdt.inv( x ,orig,...)
               

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

       x: a classed (matrix of) amount or composition, to be
          transformed with its centered default transform, or its
          inverse

     ...: generic arguments past to underlying functions.

    orig: a compositional object which should be mimicked by the
          inverse transformation. It is used to determine the
          backtransform to be used and eventually to reconstruct the
          names of the parts. It is the generic argument. Typically
          this argument is the data set that has be transformed in the
          first place.

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

     The general idea of this package is to analyse the same data with
     different geometric concepts, in a fashion as similar as possible.
     For each of the four concepts there exists a unique transform
     expressing the geometry in a linear subspace, keeping the relation
     to the variables. This unique transformation is computed by 'cdt'.
     For 'acomp' the transform is 'clr', for 'rcomp' it is 'cpt', for 
     'aplus' it is 'ilt', and for 'rplus' it is 'iit'. Each component
     of the result is identified with a unit vector in the direction of
     the corresponding component of the original composition or amount.
     Keep in mind that the transform is not necessarily surjective and
     thus variances in the image space might be singular.

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

     A corresponding matrix or vector containing the transforms.

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

     R. Tolosana-Delgado, K.Gerald v.d. Boogaart <URL:
     http://www.stat.boogaart.de>

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

     van den Boogaart, K.G. and R. Tolosana-Delgado (2007)
     "compositions": a unified  R package to analyze Compositional
     Data, _Computers & Geosciences_.  (in press).

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

     'idt', 'clr', 'cpt', 'ilt', 'iit'

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

     ## Not run: 
     # the cdt is defined by
     cdt         <- function(x) UseMethod("cdt",x)
     cdt.default <- function(x) x
     cdt.acomp   <- clr 
     cdt.rcomp   <- cpt 
     cdt.aplus   <- ilt 
     cdt.rplus   <- iit 
     ## End(Not run)
     x <- acomp(1:5)
     (ds <- cdt(x))
     cdt.inv(ds,x)
     (ds <- cdt(rcomp(1:5)))
     cdt.inv(ds,rcomp(x))
       data(Hydrochem)
       x = Hydrochem[,c("Na","K","Mg","Ca")]
       y = acomp(x)
       z = cdt(y)
       y2 = cdt.inv(z,y)
       par(mfrow=c(2,2))
       for(i in 1:4){plot(y[,i],y2[,i])}

