Skip to content

envfit and adonis restricted permutations

5 messages · Steve Leonard, Gavin Simpson, Jari Oksanen

#
Hi all, 
I am using envfit and adonis to examine patterns in floristic composition
amongst sites that vary with repect to fire history and fire severity
(factors) and a number of environmental variables (mostly continuous).
Within each site vegetation has been sampled in two environments (slope and
gully, one sample in each). I have used the 'strata' argument to restrict
permutations to within sites, as I believe this accounts for the lack of
independence of samples within sites (like including site as a random factor
in a mixed model). 

Results of envfit indicate that the variables 'easting' and 'northing' are
not significantly correlated with the ordination of sites, despite having
relatively high R2 values (see 'fit1' below). When I apply envfit with
unrestricted permutations, results are significant for easting and northing
(see 'fit2'). Similarly, easting and northing are significant when I analyse
the same data using adonis (see 'mod1'). 

Can anyone explain this apparent discrepancy? Is there a problem with the
way I am using 'strata'? Any advice gratefully received. 

Thanks 

Steve 


PS Data files attached if anyone cares to delve into them
This is vegan 1.18-33 
Warning message: 
package 'vegan' was built under R version 2.13.0
***VECTORS 

                NMDS1     NMDS2     NMDS3     r2 Pr(>r)   
easting     -0.068611 -0.144025 -0.987193 0.2912  0.517   
northing    -0.015771  0.995731 -0.090943 0.2657  0.366   
ann_rain    -0.104761 -0.776971 -0.620758 0.3133  0.013 * 
Num_fire     0.578255  0.802894  0.144850 0.0213  0.820   
TSF         -0.450387 -0.325620 -0.831338 0.0476  0.936   
tpi         -0.889913  0.139690  0.434213 0.0666  0.014 * 
sr_100_mean -0.193648  0.585345 -0.787319 0.0390  0.698   
slope       -0.664790  0.506331 -0.549257 0.0809  0.004 ** 
--- 
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 
P values based on 999 permutations, stratified within strata. 

***FACTORS: 

Centroids: 
               NMDS1   NMDS2   NMDS3 
environmentg -0.3182  0.0604  0.0177 
environments  0.3113 -0.0591 -0.0173 
historyNR    -0.0686 -0.0104 -0.0526 
historyR      0.0702  0.0106  0.0538 
severityCB    0.0141 -0.0273  0.3109 
severityCS   -0.0257 -0.0702  0.2188 
severityGB   -0.0086 -0.0421 -0.0386 
severityRF    0.0199 -0.0132 -0.2918 
severityUB    0.0058  0.0891 -0.0738 
asp_classE   -0.0753  0.0850  0.0162 
asp_classN   -0.0177 -0.1153 -0.0120 
asp_classNE  -0.1051 -0.1974 -0.0086 
asp_classNW   0.1137  0.0589 -0.0183 
asp_classS    0.0738  0.0454  0.0618 
asp_classSE   0.0262  0.0909 -0.0408 
asp_classSW  -0.0778  0.1801  0.0694 
asp_classW    0.0502  0.0374 -0.0369 

Goodness of fit: 
                r2 Pr(>r)     
environment 0.2354  0.001 *** 
history     0.0177  0.001 *** 
severity    0.0810  0.001 *** 
asp_class   0.0444  0.689     
--- 
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 
P values based on 999 permutations, stratified within strata.
***VECTORS 

                NMDS1     NMDS2     NMDS3     r2 Pr(>r)     
easting     -0.068611 -0.144025 -0.987193 0.2912  0.001 *** 
northing    -0.015771  0.995731 -0.090943 0.2657  0.001 *** 
ann_rain    -0.104761 -0.776971 -0.620758 0.3133  0.001 *** 
Num_fire     0.578255  0.802894  0.144850 0.0213  0.267     
TSF         -0.450387 -0.325620 -0.831338 0.0476  0.041 *   
tpi         -0.889913  0.139690  0.434213 0.0666  0.010 ** 
sr_100_mean -0.193648  0.585345 -0.787319 0.0390  0.070 .   
slope       -0.664790  0.506331 -0.549257 0.0809  0.003 ** 
--- 
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 
P values based on 999 permutations. 

***FACTORS: 

Centroids: 
               NMDS1   NMDS2   NMDS3 
environmentg -0.3182  0.0604  0.0177 
environments  0.3113 -0.0591 -0.0173 
historyNR    -0.0686 -0.0104 -0.0526 
historyR      0.0702  0.0106  0.0538 
severityCB    0.0141 -0.0273  0.3109 
severityCS   -0.0257 -0.0702  0.2188 
severityGB   -0.0086 -0.0421 -0.0386 
severityRF    0.0199 -0.0132 -0.2918 
severityUB    0.0058  0.0891 -0.0738 
asp_classE   -0.0753  0.0850  0.0162 
asp_classN   -0.0177 -0.1153 -0.0120 
asp_classNE  -0.1051 -0.1974 -0.0086 
asp_classNW   0.1137  0.0589 -0.0183 
asp_classS    0.0738  0.0454  0.0618 
asp_classSE   0.0262  0.0909 -0.0408 
asp_classSW  -0.0778  0.1801  0.0694 
asp_classW    0.0502  0.0374 -0.0369 

Goodness of fit: 
                r2 Pr(>r)     
environment 0.2354  0.001 *** 
history     0.0177  0.029 *   
severity    0.0810  0.001 *** 
asp_class   0.0444  0.291     
--- 
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 
P values based on 999 permutations.
Call: 
adonis(formula = flora ~ environment + history + severity + asp_class +
easting + northing + ann_rain + Num_fire + TSF + tpi + sr_100_mean + slope,
method = "bray", strata = site) 

             Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)     
environment   1     4.316  4.3155 19.3742 0.08508  0.001 *** 
history       1     0.569  0.5687  2.5530 0.01121  0.001 *** 
severity      4     2.801  0.7003  3.1440 0.05523  0.001 *** 
asp_class     7     2.143  0.3061  1.3744 0.04225  0.295     
easting       1     1.115  1.1151  5.0060 0.02198  0.001 *** 
northing      1     1.860  1.8598  8.3493 0.03667  0.001 *** 
ann_rain      1     0.797  0.7966  3.5762 0.01570  0.007 ** 
Num_fire      1     0.290  0.2896  1.2999 0.00571  0.158     
TSF           1     0.159  0.1591  0.7144 0.00314  0.270     
tpi           1     0.454  0.4541  2.0388 0.00895  0.486     
sr_100_mean   1     0.369  0.3692  1.6576 0.00728  0.323     
slope         1     0.211  0.2111  0.9476 0.00416  0.491     
Residuals   160    35.639  0.2227         0.70264           
Total       181    50.722                 1.00000           
--- 
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 

http://r-sig-ecology.471788.n2.nabble.com/file/n6522883/flora_ord_cd_no_UBG.csv
flora_ord_cd_no_UBG.csv 
http://r-sig-ecology.471788.n2.nabble.com/file/n6522883/flora_sv_no_UBG.csv
flora_sv_no_UBG.csv 

-----
Dr Steve Leonard
Research Fellow
Department of Zoology| La Trobe University | Bundoora, 3086 Australia
T: +61 3 9479 2773 | M: +61 429 418 388 | F: +61 3 9479 1551 | W: www.latrobe.edu.au/zoology/

--
View this message in context: http://r-sig-ecology.471788.n2.nabble.com/envfit-and-adonis-restricted-permutations-tp6522883p6522883.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.
#
On Mon, 2011-06-27 at 16:39 -0700, Steve Leonard wrote:
Yep; Notice that the r2 values don't change whether you use `strata =
site` in the `envfit()` examples. What changes is the null distribution
of r2 values against which the observed r2 is compared. Random
permutation appears to produce results with far lower r2, in general
than the observed, whilst permuting within `site` results in many r2
values larger than the observed (~51 and ~27% more respectively for
easting and northing). The run without strata is not appropriate as the
samples are not freely exchangeable /between/ sites under the null
hypothesis if you have clustering at the site level. Using `strata` is
the more appropriate null hypothesis as samples are only freely
exchangeable **within** site. Depending on whether you have sufficient
sites, 999 permutations might be too many (there are only two
permutations within each level of `site`, so what is 2 * number of sites
in your data set?), but as yet we don't have a facility for iterating
over the full set of permutations. The general facility is available in
the `permute` package on r-forge but won't get fully integrated into
vegan until later in the summer.

As for `adonis()`, AFAIUI, it is decomposing the **entire**
dissimilarity matrix into "variance" explained by each covariate. In
nMDS, you have reduced the entire dissimilarity matrix to three
dimensions and then look for correlations in those three dimensions with
covariates. The "discrepancy" is due to the two techniques working with
different "data" and assessing different versions of "explanatory
power". These results, at first blush, would suggests to me that easting
and northing effects are in the parts of the dissimilarity matrix not
represented well by the 3-d nMDS solution.

Does this help?

G

  
    
#
Thanks Gavin, that is really helpful.

I'm still a bit uncertain re your parting words:

"These results, at first blush, would suggests to me that easting
and northing effects are in the parts of the dissimilarity matrix not
represented well by the 3-d nMDS solution."

If this was the case, wouldn't easting and northing have low r2 values in
envfit results?


Steve





-----
Dr Steve Leonard
Research Fellow
Department of Zoology| La Trobe University | Bundoora, 3086 Australia
T: +61 3 9479 2773 | M: +61 429 418 388 | F: +61 3 9479 1551 | W: www.latrobe.edu.au/zoology/

--
View this message in context: http://r-sig-ecology.471788.n2.nabble.com/envfit-and-adonis-restricted-permutations-tp6522883p6527047.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.
#
On Tue, 2011-06-28 at 16:27 -0700, Steve Leonard wrote:
The restricted permutation test is telling you that there is nothing
special about the r2 values for those covariates in the envfit case.

That was speculation; as I said, the two techniques are testing very
different things so it is difficult to make definitive statements.
Remember in nMDS all you are doing is getting a low dimensional mapping
that best fits the *rank* ordering of the dissimilarities between you
samples. adonis is able to work with the actual dissimilarities. In
terms of the rank ordering mapping, easting and northing do not appear
to be important, yet they are able to "explain" significant amounts of
the "variance" in the actual dissimilarities.

G

  
    
#
On 29/06/11 09:07 AM, "Gavin Simpson" <gavin.simpson at ucl.ac.uk> wrote:

            
Yep, and you should also note that when you use 'strata', the significance
of easting and northing are evaluated *within* strata, whereas R2 of envfit
is evaluated over all data disregarding strata (the value of R2 does not
change when you use 'strata'). If easting and northing differ between
strata, but are fairly constant within strata, you can get high R2, but no
significant results. You know your data best (and you have access to your
data), so check yourself.

Cheers, Jari Oksanen