[R-sig-eco] vegan rda

Sibylle Stöckli sibylle.stoeckli at gmx.ch
Wed Sep 28 00:50:41 CEST 2011


Dear Jari,

Thanks a lot for your very helpful comments. I still believe that my  
results are wrong using the 'standard' RDA code.

Using the following code, I receive 'points' for the Y matrix (height)  
and arrows for the X matrix (species) (see pdf). It should be the  
opposite way (as seen in the R help varespec example) so I think my  
RDA model is not yet adequate. If you look at the R help varespec  
file, you see that the 'dependent' values are placed below each species.

I  attached the txt file maybe it is easier to understand my problem:  
My dependent values are placed each in a separate variable, and below  
the species variables the identity is given (e.g. two species plot 2  
species have the values 0.5 and 0.5, and all the others are zero).
I tried as.factor for species, but I it does not look fine
As mentioned I tried to place the tree height values below each  
species, but there are a lot of NA values (e.g. in a two species plot  
I just have two species and all teh others are NA). In the varespec  
file such values would be zero (as they are not present in that plot).
The 'varechem' file is similar to my matrix. They are just the env  
variables (not yet included) giving arrows, which is perfect.

Thank a lot to the R community!
Sibylle

R example
data(varespec)
data(varechem)
## Common but bad way: use all variables you happen to have in your
## environmental data matrix
vare.cca <- cca(varespec, varechem)
vare.cca
plot(vare.cca)






My code
ME<-read.table("ME_rda.txt", na.strings="*", header=TRUE)

height<-ME[,3:6]
mortality<-ME[,7:9]
species<-ME[,11:16]
env<-ME[,10:33]

library(vegan)
ME_rda<-rda(height~.,species, scale=TRUE)
ME_rda
plot(ME_rda, scaling=-1)



More information about the R-sig-ecology mailing list