[Vegan-commits] r659 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jan 14 20:31:02 CET 2009
Author: hankstevens
Date: 2009-01-14 20:31:02 +0100 (Wed, 14 Jan 2009)
New Revision: 659
Modified:
pkg/vegan/R/adonis.R
Log:
Changed the calculation of the P-value in adonis to add 1 to both the numerator and denominator
Modified: pkg/vegan/R/adonis.R
===================================================================
--- pkg/vegan/R/adonis.R 2009-01-14 14:08:14 UTC (rev 658)
+++ pkg/vegan/R/adonis.R 2009-01-14 19:31:02 UTC (rev 659)
@@ -92,7 +92,7 @@
MeanSqs = c(SS.Exp.each/df.Exp, SS.Res/df.Res, NA),
F.Model = c(F.Mod, NA,NA),
R2 = SumsOfSqs/SumsOfSqs[length(SumsOfSqs)],
- P = c(rowSums(t(f.perms) > F.Mod)/permutations, NA, NA))
+ P = c((rowSums(t(f.perms)+1) > F.Mod)/(permutations+1), NA, NA))
rownames(tab) <- c(attr(attr(rhs.frame, "terms"), "term.labels")[u.grps],
"Residuals", "Total")
colnames(tab)[ncol(tab)] <- "Pr(>F)"
More information about the Vegan-commits
mailing list