euclidify {labdsv}R Documentation

Nearest Euclidean Space Representation of a Dissimilarity Object

Description

Calculates the nearest Euclidean space representation of a dissimilarity object by iterating the transitive closure of Pythagoras' theorem

Usage

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

Arguments

x a distance or dissimilarity object returned from dist, vegdist, or dsvdis
upper a logical switch to control wheher 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

Details

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

Value

an object of class sQuote(dist)

Note

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

Author(s)

David W. Roberts droberts@montana.edu http://ecology.msu.montana.edu/labdsv

References

http://ecology.montana.msu.edu/labdsv/

See Also

metrify

Examples

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

[Package labdsv version 1.0-1 Index]