metrify                package:labdsv                R Documentation

_N_e_a_r_e_s_t _M_e_t_r_i_c _S_p_a_c_e _R_e_p_r_e_s_e_n_t_a_t_i_o_n _o_f _a _D_i_s_s_i_m_i_l_a_r_i_t_y _O_b_j_e_c_t

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

     Calculates the nearest metric space representation of a
     dissimilarity object by iterating the transitive closure of the
     triangle inequality rule

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

     metrify(x,upper=FALSE,diag=FALSE)

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

       x: a distance or dissimilarity object returned from 'dist', 
          'vegdist', or 'dsvdis'

   upper: a logical switch to control whether to return the lower
          triangle (upper=FALSE) or upper triangle (upper=TRUE) of the
          distance matrix

    diag: a logical switch to control whether to return the diagonal of
          the distance matrix

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

     Implements a constrained iteration of the transitive closure of
     the triangle inequality, such that the distance between any two
     objects is less than or equal to the sum of the distances from the
     two objects to a third.

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

     a object of class 'dist'

_N_o_t_e:

     Many multivariate statistical methods are designed for metric
     spaces, and yet the direct calculation of distance is often
     inappropriate due to problems with joint absences.  metrify takes
     any dissimilarity matrix and converts it to the closest metric
     space representation, generally to avoid negative eigenvalues in
     an eigenanalysis of the matrix.

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

     David W. Roberts droberts@montana.edu <URL:
     http://ecology.msu.montana.edu/droberts>

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

     <URL: http://ecology.msu.montana.edu/labdsv/R>

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

     'euclidify'

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

     data(bryceveg) # returns a vegetation data.frame
     dis.bc <- dsvdis(bryceveg,'bray/curtis') # calculate a Bray/Curtis
                 #  dissimilarity matrix
     dis.met <- metrify(dis.bc) # calculate the nearest euclidean
                 #  representation 

