[Vegan-commits] r1177 - in pkg/vegan: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 15 14:52:02 CET 2010


Author: jarioksa
Date: 2010-03-15 14:52:02 +0100 (Mon, 15 Mar 2010)
New Revision: 1177

Modified:
   pkg/vegan/R/print.permutest.cca.R
   pkg/vegan/inst/ChangeLog
Log:
put observed statistic among permutations in print of P-value

Modified: pkg/vegan/R/print.permutest.cca.R
===================================================================
--- pkg/vegan/R/print.permutest.cca.R	2010-03-15 10:19:27 UTC (rev 1176)
+++ pkg/vegan/R/print.permutest.cca.R	2010-03-15 13:52:02 UTC (rev 1177)
@@ -3,7 +3,7 @@
 {
     cat("\nPermutation test for", x$method, "\n\n")
     writeLines(strwrap(pasteCall(x$call)))
-    Pval <- sum(x$F.perm >= x$F.0)/x$nperm
+    Pval <- (sum(x$F.perm >= x$F.0) + 1)/(x$nperm + 1)
     cat("Permutation test for ")
     if (x$first)
         cat("first constrained eigenvalue\n")

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2010-03-15 10:19:27 UTC (rev 1176)
+++ pkg/vegan/inst/ChangeLog	2010-03-15 13:52:02 UTC (rev 1177)
@@ -19,7 +19,10 @@
 	* permutest.cca: re-weighting of permuted CCA data matrix is now
 	done with compiled code using existing C function 'wcentre' (in
 	goffactor.c). This may give huge speed-up (>50% time save in first
-	tests) both in CCA and pCCA. 
+	tests) both in CCA and pCCA.  The print function of permutest puts
+	now the observed statistic among permutations (the P-value is only
+	evaluated at printing so that this does not influence any
+	anova.cca function using permutest.cca).
 	
 Version 1.18-2 (closed March 8, 2010)
 



More information about the Vegan-commits mailing list