Confirmation of the Euclidean nature of a distance matrix by the Gower's theorem.
IsEuclid is used in summary.dist.

IsEuclid(distmat, plot = FALSE, print = FALSE, tol = 1e-07)

Arguments

distmat

an object of class 'dist'

plot

a logical value indicating whether the eigenvalues bar plot of the matrix of the term \(-\frac{1}{2} {d_{ij}^2}\) centred by rows and columns should be diplayed

print

a logical value indicating whether the eigenvalues of the matrix of the term \(-\frac{1}{2} {d_{ij}^2}\) centred by rows and columns should be printed

tol

a tolerance threshold : an eigenvalue is considered positive if it is larger than -tol*lambda1 where lambda1 is the largest eigenvalue.

Value

returns a logical value indicating if all the eigenvalues are positive or equal to zero

References

Gower, J.C. and Legendre, P. (1986) Metric and Euclidean properties of dissimilarity coefficients. Journal of Classification, 3, 5–48.

Author

Daniel Chessel
Stephane Dray dray@biomserv.univ-lyon1.fr

Examples

w <- matrix(runif(10000), 100, 100)
w <- dist(w)
summary(w)
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>   3.100   3.913   4.075   4.074   4.235   4.919 
IsEuclid (w) # TRUE
#> [1] TRUE