Hi, Why does vegan not plot species as arrows in plot? I know how to use scores() and arrows() to create my own arrows, but it seems odd that this feature is not built in. Is there ever a situation where species *should* be plotted as points rather than arrows? I checked ?plot.cca, vegan-decision, and google, but I didn't find anything, (excepting the possibility of using biplot.rda, but only for unconstrained analyses). Thanks, Tyler
vegan RDA triplot species arrows
8 messages · Tyler Smith, Gavin Simpson, Jari Oksanen
On Wed, 2011-05-04 at 15:44 -0400, Tyler Smith wrote:
Hi, Why does vegan not plot species as arrows in plot? I know how to use scores() and arrows() to create my own arrows, but it seems odd that this feature is not built in. Is there ever a situation where species *should* be plotted as points rather than arrows? I checked ?plot.cca, vegan-decision, and google, but I didn't find anything, (excepting the possibility of using biplot.rda, but only for unconstrained analyses).
I don't know, but it might having something to do with Jari's aversion to using linear methods for species data ;-) More seriously, perhaps this hasn't/didn't occur to the developers, despite being the author of biplot.rda() I never got round to doing a triplot() generic and method... If you would care to offer some code it would be appreciated, otherwise I might get to take a look later in May. G
Thanks, Tyler
_______________________________________________ R-sig-ecology mailing list R-sig-ecology at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson <gavin.simpson at ucl.ac.uk> writes:
On Wed, 2011-05-04 at 15:44 -0400, Tyler Smith wrote:
Why does vegan not plot species as arrows in plot? I know how to use scores() and arrows() to create my own arrows, but it seems odd that this feature is not built in. Is there ever a situation where species *should* be plotted as points rather than arrows?
I don't know, but it might having something to do with Jari's aversion to using linear methods for species data ;-)
Oh, right. I guess the pre-transformation of species data is still a recent development, so maybe it made sense to discourage using RDA with species as dependent variables.
More seriously, perhaps this hasn't/didn't occur to the developers, despite being the author of biplot.rda() I never got round to doing a triplot() generic and method... If you would care to offer some code it would be appreciated, otherwise I might get to take a look later in May.
Once my exams are graded, I'll take a look at the existing code and see what I can do! Cheers, Tyler
On 4/05/11 22:44 PM, "Tyler Smith" <tyler.smith at eku.edu> wrote:
Hi, Why does vegan not plot species as arrows in plot? I know how to use scores() and arrows() to create my own arrows, but it seems odd that this feature is not built in. Is there ever a situation where species *should* be plotted as points rather than arrows? I checked ?plot.cca, vegan-decision, and google, but I didn't find anything, (excepting the possibility of using biplot.rda, but only for unconstrained analyses).
Tyler, Do you mean something like library(vegan) data(dune) m <- rda(dune) plot(m, dis="si") plot(envfit(m ~ ., dune), add=TRUE) Like Gavin said in another message: I hate this. My feelings shouldn't stop you. There was an earlier discussion in this group for using species arrows in dbRDA (capscale in vegan). Search for that. For constrained ordination, you got to base envfit on "lc" scores instead of "sites". Cheers, Jari
On 4/05/11 22:44 PM, "Tyler Smith" <tyler.smith at eku.edu> wrote:
Why does vegan not plot species as arrows in plot? I know how to use scores() and arrows() to create my own arrows, but it seems odd that this feature is not built in. Is there ever a situation where species *should* be plotted as points rather than arrows? I checked ?plot.cca, vegan-decision, and google, but I didn't find anything, (excepting the possibility of using biplot.rda, but only for unconstrained analyses).
Tyler,
Not using arrows for species is a design decision, and it is mainly for
practical reasons. Ordination graphics are usually very messy with points,
and if you add arrows they get messier beyond grasp. The arrows are readable
only for a small number of species. Try them, say, in the BCI data and
describe what you see: it is pretty close to a Rorschach test. CanoDraw and
GUI wrappers around Canoco get around this by secretly dropping out most
species and showing only a selection (you can overrule their decision by
navigating in the GUI if you know how to do it). Having arrows for species
and arrows for constraints is the mess squared. Actually, when Gavin
implemented biplot.cca, we discussed about having a triplot, but decided
that having two kind of arrows is a mess nobody wants to see. It is doable,
of course, but is this really something you want to get.
Here is my previous example in the constrained ordination framework:
m <- rda(dune ~ A1 + Management, dune.env)
plot(m, dis=c("si","cn"))
plot(envfit(m ~ ., dune, display="lc"), add = TRUE, col="red")
To test that this gives the correct kind of arrows, you can add species
scores which should lay on the arrows or their continuations.
I agree that the use of arrows is justified in PCA & RDA. They are linear
methods, and the arrows show the linear trends. There is also one advantage
in arrows: logically, the *absolute* location of the arrow head is
irrelevant. The only things that matter are the directions and *relative*
lengths of arrows. In this way you get over the tricky issue of scaling
species and site scores against each other in absolute units. This is really
tricky in PCA/RDA and I really do not know a real good solution. We have
tried several in vegan, and the one we use works sometimes nicely, but not
always.
Gav is correct about my aversion to arrows. However, I think they are
appropriate for strictly linear and Euclidean methods (PCA, RDA). They may
not be adequate for metric scaling with non-Euclidean dissimilarities
(cmdscale, capscale) but may not be entirely bad either. Certainly they are
dubious for CA and related methods and NMDS, but can be easily added in
vegan using envfit like above (but, please, please, please...). However,
there are worse aversions in this area than mine: Dave Roberts once told me
that he doesn't see species as *points* (or arrows), but "fields" or
response surfaces in n-dimensional space. I agree, but I don't know how to
display that to, say, 225 species in the BCI data.
Cheers, Jari Oksanen
4 days later
Jari Oksanen <jari.oksanen at oulu.fi> writes:
Why does vegan not plot species as arrows in plot? I know how to use scores() and arrows() to create my own arrows, but it seems odd that this feature is not built in. Is there ever a situation where species *should* be plotted as points rather than arrows?
Not using arrows for species is a design decision, and it is mainly for practical reasons. Ordination graphics are usually very messy with points, and if you add arrows they get messier beyond grasp.
Thanks for your detailed response. I disagree with your conclusion, though. Granted, all those arrows do make the plots messy, I think the better solution would be to drop the shorter arrows (which are less meaningful), rather than the lines of all arrows. My reasoning is that whether or not you plot the lines, the species are in fact arrow heads. Suppressing the lines makes them look like centroids. This leads to confusion between a CCA plot, with species plotted as true centroids, and an RDA plot, with arrows that appear to be centroids. This is an issue I've seen in a number of the projects submitted as part of a grad course in ordination here. Whether arrows are preferable to centroids or response surfaces is a separate issue, and I think there are strong points supporting each of the three representations depending on the circumstances. One of the strongest arguments for using species arrows on an RDA is convention: the method produces arrows by design, so you ought to have a very good reason to use some other representation of species. In any case, if you are interested I would be happy to attempt to add code to plot.cca to do what I'd prefer. If not, no worries, I can make a wrapper function to get what I want without modifying vegan. Thanks, Tyler
On 9/05/11 17:55 PM, "Tyler Smith" <tyler.smith at eku.edu> wrote:
Jari Oksanen <jari.oksanen at oulu.fi> writes:
Why does vegan not plot species as arrows in plot? I know how to use scores() and arrows() to create my own arrows, but it seems odd that this feature is not built in. Is there ever a situation where species *should* be plotted as points rather than arrows?
Not using arrows for species is a design decision, and it is mainly for practical reasons. Ordination graphics are usually very messy with points, and if you add arrows they get messier beyond grasp.
e some other representation of species. In any case, if you are interested I would be happy to attempt to add code to plot.cca to do what I'd prefer. If not, no worries, I can make a wrapper function to get what I want without modifying vegan.
Tyler, Vegan has two general design principles: (1) there are design principles, (2) they can be overruled. I'll be happy to accept plot.cca amendment -- providing they are "acceptable". I'm not quite sure how to code this new plotting option without breaking other conventions. Like you wrote, you probably need to drop some of the arrows, and this is different from ordinary plot(). I have consciously opted to have all species/sites in plots and not to drop some of those automatically. CanoDraw (IIRC) uses goodness-of-fit which usually drop rare species which cannot have a good linear fit. You suggested dropping shorter arrows. So you need to decide how to control the kept arrows, and how to allow the user control to overrule your choice (that is always needed in vegan style). I do think that if you go for arrows, you must go completely. This means that you need to get rid of absolute scaling of the locations of the arrow heads (now points). The location of arrow heads have no special meaning wrt site points. All features you must preserve are relative lengths of arrows wrt each other, and their directions. So you need an automatic rescaling of coordinates so that the arrows fill the graphics space. Finally a comment about arrows as a convention in RDA: I disagree -- it is not a convention in RDA, but a convention in CanoDraw and its heirs. I never liked it when CanoDraw introduced this for the reasons I gave earlier (messy). Points were quite common in displaying PCA results even earlier, although some people used arrows, especially with small data sets. Cheers, Jari Oksanen
Jari Oksanen <jari.oksanen at oulu.fi> writes:
In any case, if you are interested I would be happy to attempt to add code to plot.cca to do what I'd prefer. If not, no worries, I can make a wrapper function to get what I want without modifying vegan.
Vegan has two general design principles: (1) there are design principles, (2) they can be overruled. I'll be happy to accept plot.cca amendment -- providing they are "acceptable".
I'll see what I can do, keeping in mind the considerations you mention.
Finally a comment about arrows as a convention in RDA: I disagree -- it is not a convention in RDA, but a convention in CanoDraw and its heirs. I never liked it when CanoDraw introduced this for the reasons I gave earlier (messy). Points were quite common in displaying PCA results even earlier, although some people used arrows, especially with small data sets.
That's interesting to know, thanks. My apologies for conflating my textbook with universal standard practice! Cheers, Tyler