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

Novack-Gottshall, Philip M. pnovack-gottshall at ben.edu
Mon Jan 18 21:28:15 CET 2016


Hi Edward,

dbFD can sometimes be mercurial for peculiar data sets, and it seems
your experience is typical. The presence of functionally identical taxa
(assuming that's the case in your data, given the high frequency of zero
distances you report) can make things more troublesome. (This was fixed
with the latest version, but older versions maintained rounding issues
from ade4::dudi.pco that caused functionally identical species to be
given negligible differences in PCoA space [e.g., axis scores of 15 vs.
15.00000000001], which totally screwed up the FRic convex hull
calculations.) So first make sure you're using the latest version (v.
1.0-12) of FD.

If that doesn't fix it, have you tried specifying lower values of 'm'?
Seb Villeger and colleages (Villeger et al. 2011; Maire et al 2015)
generally recommend using as many as possible, but I've found that
highly redundant data sets can cause issues here, too. You might try
different values (the default is the maximum) to see if that prevents
errors. Try starting with m=3 and increase from there. (But beware that
you should use the same m across samples, if you wish to compare them.
See stand.FRic in the help file for details.)

Lacking other solutions, I'd recommend comparing your results using the
various corrections. Are the results substantially different? If not,
then using 'none' correction might be sufficient.

You may also be interested in a package I just released. It's called
'ecospace' and details can be found at
https://cran.r-project.org/web/packages/ecospace/index.html  The
'calc_metrics' function wraps around FD:dbFD but specifies m=3 and
corr=lingoes, which is a combination I've found has worked for a wide
range of functionally redundant datasets (such as the 'redundancy'
function, that stochastically generates functionally identical
assemblages.) Additional details on the package are available in two
preprints at https://www.researchgate.net/profile/Philip_Novack-Gottshall

Refs:
Maire, E., G. Grenouillet, S. Brosse, and S. Villéger. 2015. How many
dimensions are needed to accurately assess functional diversity? A
pragmatic approach for assessing the quality of functional spaces.
Global Ecology and Biogeography 24(6):728-740.

Novack-Gottshall, P.M. 2016 (in press). General models of ecological
diversification. I. Conceptual synthesis. Paleobiology 42.

Novack-Gottshall, P.M. 2016 (in press). General models of ecological
diversification. II. Simulations and empirical applications.
Paleobiology 42.

Villéger, S., P. M. Novack-Gottshall, and D. Mouillot. 2011. The
multidimensionality of the niche reveals functional diversity changes in
benthic marine biotas across geological time. Ecology Letters 14(6):561-568.

Cheers,
Phil



On 1/18/2016 12:45 PM, Edward Krynak wrote:
> 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]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>




More information about the R-sig-ecology mailing list