[R-sig-eco] envfit function: is it possible to display correlation coefficient?

syrovat syrovat at sci.muni.cz
Wed May 2 16:35:33 CEST 2018


Dear all,
Just to expand the reply by Zoltan.

NMDS1 and NMDS2 in the envfit() output are the positions of heads of 
arrows of unit length.
They show the direction of the "best" linear fit into the n-dimensional 
solution of the ordination.
The r2 then says how good the fit is. I.e. it refers to both axes at 
once (or even more axes, if choices= argument is used).
I says how much variance in the variable (e.g. N) is explained by the 
position of objects in the n-dimensional ordination
(by the linear combination of the object scores)?
Or, how consistent is the linear change in the values of the variable 
within the ordination result in that direction?

Imagine you model the variables (e.g. N) as a linear function of NMDS1 + 
NMDS2. The r2 of the model is the envfit() r2:

summary(lm(varechem$N ~ scores(ord)[,"NMDS1"] + 
scores(ord)[,"NMDS2"]))$r.squared
[1] 0.2536379

As Zoltan replied, correlation does not make much sense, the fit is more 
informative.
Arrow-head positions show the direction, r2 the proportion of variance 
explained by that direction
and p (Pr(>r)) the probability that such a result would be achieved by 
chance.

All the best,
Vit


Dne 2018-05-02 07:27, Botta-Dukát Zoltán napsal:
> Dear Irene,
> 
> NMDS does not calculate coordinates along each axis separately (as do
> metric ordinations, e.g. cmdscale function), but it optimize the whole
> 2-dimensional configuration of points. Any rotation does not change
> the configuration, but it changes coordinates along both axes. So
> coordinates along axes should not be interpreted, and correlation with
> first NMDS axis has no meaning.
> 
> Best regards,
> 
> Zoltan
> 
> 
> 
> 2018. 05. 01. 15:50 keltezéssel, Irene Adamo írta:
>>   Dear all,
>> I have already looked at similar questions about this topic but I 
>> still
>> have few doubts.
>> when I run:
>> data(varespec, varechem)
>> library(MASS)
>> ord <- metaMDS(varespec)
>> (fit <- envfit(ord, varechem, perm = 999))
>> 
>> I get this output:
>> ***VECTORS
>> 
>>              NMDS1    NMDS2     r2 Pr(>r)
>> N        -0.05738 -0.99835 0.2536  0.041 *
>> P         0.61980  0.78476 0.1938  0.105
>> K         0.76650  0.64225 0.1810  0.098 .
>> Ca        0.68524  0.72832 0.4119  0.001 ***
>> 
>> are the numbers under NMDS1-2  the direction of the arrow or they show
>> to which axis is the variable correlated? if I look at N can I 
>> conclude
>> that N is negatively correlated to NMDS2, while K is positively 
>> correlated
>> to NMDS1? is it possible to get the correlation coefficient of a 
>> variable
>> with the axes? here we have r2 but I don’t understand if it refers to 
>> both
>> of the axis or just one.
>> 
>> thanks a lot for any help!
>> 
>> 	[[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> R-sig-ecology mailing list
>> R-sig-ecology at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> 
> 
> ---
> Ezt az e-mailt az Avast víruskereső szoftver átvizsgálta.
> https://www.avast.com/antivirus
> 
> _______________________________________________
> 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