[R-sig-eco] significance in anova.cca (vegan): by terms vs by margin

Julian M. Burgos julian at hafro.is
Mon Apr 14 12:50:38 CEST 2014


Dear list,

I am looking for some pointers on how to use the anova.cca function in
the vegan package to test the significance of predictors in a redundancy analysis
(RDA).   

Let's say that I have a simple rda, where "dep" is a 30x3 matrix with
the observations, and "indep" is a 30x6 matrix with the predictors.  I
want to figure out which of the predictors are signficant.  So I do

> library(vegan)
> myrda1 <-rda(dep ~ v1 + v2 + v3 + v4 + v5 + v6 + v7, data=indep)

Then I do

anova.cca(myrda1,by="terms")

And I find out that v1,v2,v3, and v6 are signficiant (e.g. Pr(>F)
<0.05.  So far so good.  But anova.cca does a permutation test of the
predictors in the order they are in the model.  So I rerun the model
changing the order of the variables:

> myrda2 <-rda(dep ~ v2 + v3 + v4 + v5 + v6 + v7 + v1, data=indep)
> anova.cca(myrda2,by="terms")

Now, v2, v3, v5 and v6 are significant, but v1 is not anymore.

I can also run anova.cca "by margin", which tests the marginal effect of
each variable.  If I do 

> anova.cca(myrda1,by="margin")
> anova.cca(myrda2,by="margin")

I get in both cases that variables v2, v5 and v6 are significant.

Also, instad of using anova.cca, I can use the "forward.sel" function in
the "packfor" package to identify a subset of variables that explain the same
amount of variability than the full model.  If I do this by doing

> library(packfor)
> r2 <- RsquareAdj(ra)$adj.r.squared 
> red <-forward.sel(dep,indep,adjR2thresh=r2)

I obtain a reduced model with variables v2, v5, v6, which matches the
significant variables obtained when doing anova.cca with the "by=margin"
option.  So intuitively, it seems that testing the marginal effect of each
variable (i.e. using "by=margin") is the correct way to detect the
dependent variables that do have an effect on the indpendent variables.
Is this correct?  Any insights will be welcomed!

Julian  

-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian at hafro.is



More information about the R-sig-ecology mailing list