[R-sig-eco] Quantifying functional trait diversity through Gowerdistance and pcoa

Chris Mcowen chrismcowen at gmail.com
Wed Nov 17 10:01:42 CET 2010


Dear all;

Thanks very much for all of this, it has been very helpful. As previously mentioned i am relatively new to this area, and before reading around the subject a bit more i have little to add to the, very useful, but slightly over my head comments. 

To the aims of my study and the context are as follows:

I have a dataset of 1500 species for which i have 14 life history traits - mainly dichotomous i.e woody / not woody, fleshy fruit / dry fruit but i also have some factors with more levels such as breeding system (which has 3 etc)

I have detailed GIS information for the distribution of these species allowing the identification of biodiversity hotspots i have made a phylogenetic tree of the species and calculated phylogenetic diversity and isolated phylogentic diversity hotspots. My plan was to calculate functional diversity and plot all the diversity indices on a map and look for patterns and understand the underlying processes.

I shall have a read around the areas discussed in these comments, and choose the best metric to use; i was wondering if given my scenario my approach was sensible and if there is any metric that would capture my data?

Thanks again,

Chris
On 17 Nov 2010, at 07:27, Etienne Laliberte wrote:

Following up on Jari's comments:

From my perspective, getting the right metric depends on the ecological
question asked. Some are better than others for particular questions -- and
some are not that useful regardless of the question.

That said, irrespective of the merits of different metrics that express
different individual/independent facets of FD, my limited previous
experience tells me that people are often looking for a single, "synthetic"
metric that expresses the concept of dispersion not unlike what the sample
variance does (but with more than one variable, and using weights, where
weights are species relative abundances). This is pretty much what Rao's
quadratic entropy (Q) does - a multivariate analogue of a weighted variance.

Functional dispersion (FDis) is basically just a weighted version of Marti
Anderson's multivariate dispersion, and is therefore a multivariate analogue
of the weighted mean absolute deviation (MAD). Both Rao's Q and FDis are
closely related (like the MAD and variance are), but the MAD (and FDis) is
less sensitive than the variance (and Rao's Q) to extreme values (which can
be either good or bad).

The analogy is shown here:

# get FD library
library(FD)

# get traits and abundances
trait <- runif(30) # trait with uniform values
abun <- rlnorm(30) # lognormal abundance distribution

# get names for both vectors
names(trait) <- paste("sp", 1:30, sep = "")
names(abun) <- paste("sp", 1:30, sep = "")

# get Euclidean distance matrix from traits
trait.dist <- dist(trait)

# get Rao's Q and FDis using the dbFD function in the FD library
test1 <- dbFD(trait.dist, abun, calc.FRic = F, calc.CWM = F, calc.FDiv = F)
rao <- test1$RaoQ
fdis <- test1$FDis

# weighted sum function
wsum <- function(x, w) {
  w2 <- w / mean(w)
  x2 <- sum(x * w2)
  return(x2)
}

# weighted variance function
wvar <- function(x, w) {
  x.mean <- weighted.mean(x, w)
  x2 <- (x - x.mean)^2
  x2.wvar <- wsum(x2, w) / length(x)
  return(x2.wvar)
}

# weighted mean absolute deviation
wdev <- function(x, w) {
  x.mean <- weighted.mean(x, w)
  x2 <- abs(x - x.mean)
  x2.wdev <- wsum(x2, w) / length(x)
  return(x2.wdev)
}

# get weighted variance and weighted mean absolute deviation
trait.var <- wvar(trait, abun)
trait.dev <- wdev(trait, abun)

# show that Rao's Q is a weighted variance
# while FDis is the weigthed mean absolute deviation
# rao = trait.var?
# fdis = trait.dev?
round(rao, digits = 6) == round(trait.var, digits = 6) # TRUE
round(fdis, digits = 6) == round(trait.dev, digits = 6) # TRUE

I personally feel that FD metrics that have clear univariate analogues are
easier to grasp, and justify. I must admit that I'm not so keen on
tree-based metrics, unless one can finally explain to me why it would be
useful to first cluster species (and thus to distort trait space) when one
is not actually interested in forming functional groups in the first place.
If someone has an answer to this, I'd greatly appreciate you sharing it,
because I never quite understood it.



-----Original Message-----
From: r-sig-ecology-bounces at r-project.org
[mailto:r-sig-ecology-bounces at r-project.org] On Behalf Of Jari Oksanen
Sent: Wednesday, 17 November 2010 2:38 PM
To: chris mcowen; r-sig-ecology at r-project.org
Subject: Re: [R-sig-eco] Quantifying functional trait diversity through
Gowerdistance and pcoa

Chris,

Here some random exegeses:

You should be aware that functional diversity seems to be dangerous field
where you cannot do the right thing: there are different schools of thought,
and you can always get a "wrong referee" what ever you do. Be warned. The
major difference seems to be between tree-based and ordination-based
(distance based) approaches. Some other, perhaps even more dangerous fields,
are distance decay (Mantel) vs. variation partition (RDA) where you will be
shot down by a "wrong referee" what ever you do. Even after you change your
manuscript following one referee, the other referee burns you because you
did so. Beta diversity is still one dangerous example that is hot to touch.
You better read the literature very carefully.

I find it curious that the same things have been invented in a bit different
disguise in several fields of ecology s.lat. Aquatic and marine ecologists
have taxonomic diversity which seems to be exactly the same thing except it
uses taxonomy instead of traits. Mycologists and microbiologist have
phylogenetic diversity since they don't have traits and don't know the
"species", but they only have OTUs, sequences and phylogenies. Terrestrial,
aquatic and microbial ecologists do not read the same journals and so they
reinvent parallel variants of similar things and use different words and
names.  

Finally, if you make your traits into distances (dissimilarities), it is
best to see what Marti Anderson tells you to do with them. She has ideas for
full space analysis of differences (like adonis in vegan), for full space
analysis of dispersion (like betadisper in vegan), and for reduced space
analysis (like db-RDA as in capscale in vegan). All these use the geometry
of PCoA/ classic MDS/ metric MDS, although this is not always visible to the
surface:. The full space analyses by Marti Anderson even handle the
imaginary dimensions (associated with negative eigenvalues in metric MDS)
within the function which may be very hard to handle with explicit PCoA.

Cheers, Jari Oksanen

_______________________________________________
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