mvar              package:compositions              R Documentation

_M_e_t_r_i_c _s_u_m_m_a_r_y _s_t_a_t_i_s_t_i_c_s _o_f _r_e_a_l, _a_m_o_u_n_t _o_r _c_o_m_p_o_s_i_t_i_o_n_a_l _d_a_t_a

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

     Compute the metric variance, covariance, correlation or standard
     deviation.

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

     mvar(x,...)
     mcov(x,...)
     mcor(x,...)
     msd(x,...)
     mvar.default(x,y=NULL,...)
     mcov.default(x,y=x,...)
     mcor.default(x,y,...)
     msd.default(x,y=NULL,...)

               

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

       x: a dataset, eventually of amounts or compositions

       y: a second dataset, eventually of amounts or compositions

     ...: further arguments to 'var' or 'cov'  e.g. 'use'

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

     The metric variance ('mvar') is defined by the trace of the
     variance in the natural geometry of the data, or also by the
     generalized variance in natural geometry. The natural geometry is
     equivalently given by the 'cdt' or 'idt' transforms.

     The metric standard deviation ('msd') is not the square root of
     the metric  variance, but the square root of the mean of the
     eigenvalues of the  variance matrix. In this way it can be
     interpreted in units of the original natural geometry, as the
     diameter of a 1-sigma sperical ball around the mean. 

     The metric covariance ('mvar') is the sum over the absolute
     singular values of the covariance of two datasets in their
     respective geometries. It is always positive. The metric
     covariance of a dataset with itself is its metric variance. The
     interpretation of a metric covariance is quite difficult.

     The metric correlation ('mcor') is the metric covariance of the
     datasets in their natural geometry normalized to unit variance
     matrix. It is a number between 0 and the smaller dimension of both
     natural spaces. A number of 1 means perfect correlation in 1
     dimension, but only partial correlations in higher dimensions. 

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

     a scalar number, informing of the degree of variation/covariation
     of one/two datasets.

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

     Daunis-i-Estadella, J., J.J. Egozcue, and V. Pawlowsky-Glahn
     (2002) Least squares regression in the Simplex on the simplex,
     _Terra Nostra_, Schriften der Alfred Wegener-Stiftung, 03/2003

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

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

     'var', 'cov', 'mean.acomp', 'acomp', 'rcomp', 'aplus', 'rplus'

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

     data(SimulatedAmounts)
     mvar(acomp(sa.lognormals))
     mvar(rcomp(sa.lognormals))
     mvar(aplus(sa.lognormals))
     mvar(rplus(sa.lognormals))

     msd(acomp(sa.lognormals))
     msd(rcomp(sa.lognormals))
     msd(aplus(sa.lognormals))
     msd(rplus(sa.lognormals))

     mcov(acomp(sa.lognormals5[,1:3]),acomp(sa.lognormals5[,4:5]))
     mcor(acomp(sa.lognormals5[,1:3]),acomp(sa.lognormals5[,4:5]))
     mcov(rcomp(sa.lognormals5[,1:3]),rcomp(sa.lognormals5[,4:5]))
     mcor(rcomp(sa.lognormals5[,1:3]),rcomp(sa.lognormals5[,4:5]))

     mcov(aplus(sa.lognormals5[,1:3]),aplus(sa.lognormals5[,4:5]))
     mcor(aplus(sa.lognormals5[,1:3]),aplus(sa.lognormals5[,4:5]))
     mcov(rplus(sa.lognormals5[,1:3]),rplus(sa.lognormals5[,4:5]))
     mcor(rplus(sa.lognormals5[,1:3]),rplus(sa.lognormals5[,4:5]))

     mcov(acomp(sa.lognormals5[,1:3]),aplus(sa.lognormals5[,4:5]))
     mcor(acomp(sa.lognormals5[,1:3]),aplus(sa.lognormals5[,4:5]))

