[R] cca standard error species
Jari Oksanen
jari.oksanen at oulu.fi
Tue Apr 27 14:41:57 CEST 2010
prb <eco.prb <at> gmail.com> writes:
>
> Dear all,
>
> I realised a correspondence analysis with function cca() of vegan library.
> Just like in Okansen (2010) in the example of R help:
>
> library(vegan)
> data(varespec)
> data(varechem)
> vare.cca<-cca(varespec~ Al + P + K, varechem)
>
> With plot.cca() function I represented the species matrix in the next way:
> plot(vare.cca,display="species")
>
> Being similar to:
> plot((c(-2,2)),(c(-2,2)), type="n", xlab="AXIS 1", ylab="AXIS 2")
> points(vare.cca,display='species')
>
> Now, I want to add to this graph a standard error in 'x' and 'y' direction.
> How can I add it? I tried different options but I do not get it. It will be
> just like the function ordiellipse of ellipse library and others like
> ordihull of vegan library, but without add any factor level. The program CAP
> of Anderson realice this kind of output and I am wondering if in R exists
> some function implemented that deals with it. Some examples of these
> graphics will be found in Quero et al., 2008 Basic and Applied Ecology 9:
> 635-644; Maestre et al., 2009 Ecology Letters 12: 930 - 941.
>
Paloma,
This is a question on specific package, and I'm not sure that general R News is
a suitable forum to answer this. I suggest you re-send this message to
r-sig-ecology at r-project.org (see special interest groups at
http://www.r-project.org/mail.html for more info). Although vegan indeed is a
special, questions related to vegan are regularly discussed there and the
subject may be tolerated at that forum (or we may assume as long as we are not
told to go away). Another alternative is to use vegan fora at
http://vegan.r-forge.r-project.org/ which are dedicated to vegan questions.
Then a brief preliminary aswer to your question: you should tell us what is
"species standard error". I can guess what you mean, and if I guess correctly,
this can be done. Here is one way how to do this for one species continuing your
example:
plot(vare.cca, scaling=2, type="n")
text(vare.cca, dis="species", scaling=2, cex=0.6)
with(varespec, ordiellipse(vare.cca, rep(1, 24), show= TRUE, display="lc",
scaling=2, w= Cet.niv, col=2))
Why this works and what this means is better explained in some more dedicated
news group: there are many fine details. This is also based on the hypothesis
that I guessed correctly what you wanted to do.
Cheers, Jari Okansen
More information about the R-help
mailing list