[R-sig-eco] issues with Non euclidean distance using function dbFD

Edward Krynak ekrynak at gmail.com
Mon Jan 18 19:44:35 CET 2016


Hi,
I'm trying to use dbFD {FD} with invertebrate data and I'm running in to
issues with non euclidean distances.  Any help or suggestions would be
appreciated.
My taxa data consists of 54 sites x 98 taxa and my trait data consists of
98 taxa x 8 traits.  The traits are 3 non-ordered factors, 2 ordered
factors, 2 numeric binary, and 1 numeric, totaling 8 traits. All but one
trait has NAs, with most having many NAs. When I run dbFD: FD.ag<-dbFD(tra,
spe.abu, corr = "cailliez") I get the warning messages:

Warning messages:
1: In is.euclid(x.dist) : Zero distance(s)
2: In is.euclid(x.dist) : Zero distance(s)
3: In is.euclid(distmat) : Zero distance(s)
4: In dudi.pco(x.dist2, scannf = FALSE, full = TRUE) :
  Non euclidean distance
5: In is.euclid(x.dist) : Zero distance(s)
6: In is.euclid(x.dist) : Zero distance(s)
7: In is.euclid(x.dist) : Zero distance(s)

I understand (I think) that warnings 1-3,5-7 are because several of my taxa
express the same traits.  My major concern is about warning 4. I have tried
both the cailliez and lingoes correction with similar results.  The
function still runs and produces a result, but is that result valid? In the
R doc the authors suggest using PCoA axes corresponding to negative
eigenvalues would lead to biased estimations of FD. Using no corrrection,
corr = "none", uses only the positive eigenvalues and eliminates warning 4,
but I'm concerned about a loss of info if I were to do that. I have tried
dropping and adding traits and/or taxa just to see if I could get it to run
without the warning.  At times it stops completely after warning 4 and
produces no results, and other times the results are the same.  I'm having
trouble understanding why it will stop after warning 4 with some data, but
continue with other data.

I have also tried running gowdis {FD} separately followed by a cailliez
{ade4} correction.  If I set cor.zero = F (zero distance ARE modified),
then use the dist matrix in dbFD, it runs without any warnings.  However, I
have not been able to find the legitimacy of modifying zero distances in a
distance matrix.

I would welcome in help, suggested readings, or suggestion modifications.

Cheers,
Ed

	[[alternative HTML version deleted]]



More information about the R-sig-ecology mailing list