pcdists {pcurve}R Documentation

Extended Distance Matrix Calculation

Description

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

Usage

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

Arguments

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

Details

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.

Value

A list comprising

d a dissimilarity matrix of the specified metric.
dnew a matrix of extended dissimilarity measures.

Author(s)

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

References

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

Examples

#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))

[Package Contents]