pcdists                package:pcurve                R Documentation

_E_x_t_e_n_d_e_d _D_i_s_t_a_n_c_e _M_a_t_r_i_x _C_a_l_c_u_l_a_t_i_o_n

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

     Calculates and returns a matrix of extended dissimilarities
     between rows of a data matrix using the specified distance
     measure.

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

     pcdists(data, dcrit = 1, use.min = TRUE, metric = "man", scale = TRUE, eps
     = 0.0001, replace.neg = TRUE, big = 10000)

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

    data: numeric data matrix

   dcrit: critical distance, the threshold dissimilarity at which the
          dissimilarity is replaced using the flexible shortest path
          adjustment method.

 use.min: 

  metric: distance measure to be calculated. "man", Manhattan (=
          row-standardized Bray-Curtis); "euc", Euclidean; "bin",
          Binary. see `dist' for further details.

   scale: if TRUE each column is standardized to the maximum value, if
          FALSE, columns remain unstandardized.

     eps: minimum difference from critical distance for iterations.

replace.neg: 

     big: 

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

     This function calculates calculates extended dissimilarity
     matrices, including the Bray-Curtis distance measure, of common
     application in ecology.  See De'ath (1999) for a full discussion
     of extended dissimilarity.

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

     A list comprising

       d: a dissimilarity matrix of the specified metric.

    dnew: a matrix of extended dissimilarity measures.

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

     R port by Chris Walsh Chris.Walsh@sci.monash.edu.au from S+
     library by Glenn De'ath glenn.death@jcu.edu.au.

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

     De'ath, G. 1999 Extended dissimilarity: method of robust
     estimation of ecological distances with high beta diversity. Plant
     Ecology 144, 191-199.

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

     #for simulated data set with high Beta diversity (many rows with
     #no columns in common, and then calculate extended dissimilarity
     #matrices with critical distance = 1 and 0.7.  Finally plot
     #dissimilarities in each case against ecological distance to
     #demonstrate the effect of extended dissimilarities on the
     #linearity of the relationship.
     data(sim10var)
     species <- sqrt(sim10var[, 2:11])
     specdist <- pcdists(species, dcrit = 1, metric = "man", scale = FALSE)
     SD <- c(specdist$d)
     XD <- c(specdist$dnew)
     specdist <- pcdists(species, dcrit = 0.7, metric = "man", scale = FALSE)
     XD1 <- c(specdist$dnew)
     #Ecological distance as euclidean distance between locations
     #on known gradient
     ecdist <- dist(sim10var[, 1], method = "euc")
     ED <- c(ecdist)
     par(mfrow = c(1, 3))
     plot(ED, SD)
     plot(ED, XD)
     plot(ED, XD1)
     par(mfrow = c(1, 1))

