[R-sig-eco] envfit() in vegan
Jari Oksanen
jari.oksanen at oulu.fi
Thu Oct 17 09:32:30 CEST 2013
On 17/10/2013, at 02:49 AM, Paolo Piras wrote:
> Dear list,
> I write you because I do not understand the behavior of envfit() in vegan.
> Basically, it takes a matrix coming from an ordination procedure and it fits on it another matrix (often an environmental matrix).
> The projections of points onto vectors have maximum correlation with corresponding environmental variables.
>
> A permutation test is associated to this procedure and it basically performs a series of correlations between any column in the environmental matrix and the ordnation matrix.
> Maybe my question is trivial (or simply ...wrong) but..intuitively, this should return the same results found from a series of separate multivariate regressions between any single column in the environmental matrix and the entire ordination matrix.
> However it is not the case, being the envfit() results much more liberal when compared to regression (i.e. using rda) and the r2 are drastically larger than R-sq from rda.
> I suspect that the metric undergoing the permutation test of significance in envfit() that is squared correlation coefficient (r^2) does not correspond to the R-sq calculated using rda.
>
Paolo,
I am afraid I cannot quite understand your problems. A reproducible example with some numbers could be useful.
I did not quite catch your comparison of RDA and envfit. They are quite different methods, and their R2's really are for different things (but with special tricks these things can be made similar). In RDA, the R2 tells how well the ordination predicts the species abundances, and in envfit() the R2 tells how well the ordination predicts the environmental variables. For a basic and normal usage of RDA let us compare the following cases:
library(vegan)
data(varespec, varechem)
mod <- rda(varespec ~ Al + P + K, varechem)
## gives unadjusted R2=0.377
envfit(mod ~ Al + P + K, varechem, display="lc", choices=1:3)
## **should** give for all vars r2=1 because they were the constraints
Cheers, Jari Oksanen
More information about the R-sig-ecology
mailing list