str(mite.env) (mite.subs=mite.env[,c(1,2,3)]) #First set of variables outlined in challenge (mite.other=mite.env[,c(4,5)]) #Second set of variables outlined in challenge #RDA for mite.subs rda.mite.subs <- rda(mite.spe.hel~., data=mite.subs) R2a.all.subs <- RsquareAdj(rda.mite.subs)$adj.r.squared #Forward selection for mite.subs ordiR2step(rda(mite.spe.hel~1, data=mite.subs), scope= formula(rda.mite.subs), direction= "forward", R2scope=TRUE, pstep=1000) names(mite.subs) (mite.subs.pars <- mite.subs[, c(2, 3)]) #RDA for mite.other rda.mite.other <- rda(mite.spe.hel~., data=mite.other) R2a.all.other <- RsquareAdj(rda.mite.other)$adj.r.squared #Forward selection for mite.other ordiR2step(rda(mite.spe.hel~1, data=mite.other), scope= formula(rda.mite.other), direction= "forward", R2scope=TRUE, pstep=1000) names(mite.other) (mite.other.pars <- mite.other[, c(1,2)]) #Variation partitioning (mite.spe.part <- varpart(mite.spe.hel, ~WatrCont+Substrate, ~Shrub+Topo, data=mite.env)) windows(title="Variation partitioning - parsimonious subsets") plot(mite.spe.part, digits=2) # Tests of all testable fractions anova.cca(rda(mite.spe.hel~ WatrCont+Substrate, data=mite.env), step=1000) # Test of fractions [a+b] anova.cca(rda(mite.spe.hel~Shrub+Topo, data=mite.env), step=1000) # Test of fractions [b+c] (env.pars <- cbind(mite.env[,c(2,3,4,5)])) anova.cca(rda(mite.spe.hel~ WatrCont+Substrate+Shrub+Topo, data=env.pars), step=1000) # Test of fractions [a+b+c] anova.cca(rda(mite.spe.hel~WatrCont+Substrate + Condition(Shrub+Topo), data=env.pars), step=1000) # Test of fraction [a] anova.cca(rda(mite.spe.hel~Shrub+Topo+ Condition(WatrCont+Substrate ), data=env.pars), step=1000) # Test of fraction [c]