[Vegan-commits] r2735 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Nov 21 18:46:21 CET 2013
Author: jarioksa
Date: 2013-11-21 18:46:21 +0100 (Thu, 21 Nov 2013)
New Revision: 2735
Modified:
pkg/vegan/R/anovacca.byterm.R
Log:
use 'permutations' matrix in anovacca.byaxis
Modified: pkg/vegan/R/anovacca.byterm.R
===================================================================
--- pkg/vegan/R/anovacca.byterm.R 2013-11-21 16:53:00 UTC (rev 2734)
+++ pkg/vegan/R/anovacca.byterm.R 2013-11-21 17:46:21 UTC (rev 2735)
@@ -54,7 +54,10 @@
dfbig <- big$df[2]
chibig <- big$chi[2]
scale <- big$den/dfbig
- ## Collect all marginal models
+ ## Collect all marginal models. This differs from old version
+ ## (vegan 2.0) where other but 'nm' were partialled out within
+ ## Condition(). Now we only fit the model without 'nm' and compare
+ ## the difference against the complete model.
mods <- lapply(trmlab, function(nm, ...)
permutest(update(object, paste(".~.-", nm)),
permutations, ...))
@@ -97,7 +100,8 @@
for (i in 1:length(eig)) {
Partial <- LC[,-i]
mod <- permutest(update(object, . ~ . + Condition(Partial)),
- model = model, parellel = parallel)
+ permutations, model = model,
+ parellel = parallel)
Pvals[i] <- (sum(mod$F.perm >= mod$F.0) + 1)/(nperm+1)
}
out <- data.frame(c(Df, resdf), c(eig, object$CA$tot.chi),
More information about the Vegan-commits
mailing list