[Vegan-commits] r1380 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Nov 23 16:58:39 CET 2010
Author: jarioksa
Date: 2010-11-23 16:58:39 +0100 (Tue, 23 Nov 2010)
New Revision: 1380
Modified:
pkg/vegan/R/mantel.correlog.R
pkg/vegan/inst/ChangeLog
Log:
remove a fix that tried to fix a fixed thing
Modified: pkg/vegan/R/mantel.correlog.R
===================================================================
--- pkg/vegan/R/mantel.correlog.R 2010-11-23 15:54:15 UTC (rev 1379)
+++ pkg/vegan/R/mantel.correlog.R 2010-11-23 15:58:39 UTC (rev 1380)
@@ -95,10 +95,12 @@
temp <- mantel(mat.D2, D.eco, method=r.type, permutations=nperm)
mantel.r <- c(mantel.r, -temp$statistic)
temp.p <- temp$signif
- if(temp$statistic >= 0) {
- temp.p <- ((temp.p*nperm)+1)/(nperm+1)
- } else {
- temp.p <- (((1-temp.p)*nperm)+1)/(nperm+1)
+
+ ## The mantel() function produces a one-tailed p-value
+ ## (H1: r>0) Here, compute a one-tailed p-value in
+ ## direction of the sign
+ if(temp$statistic < 0) {
+ temp.p <- ((1-temp.p)*(nperm+1))/(nperm+1)
}
mantel.p <- c(mantel.p, temp.p)
} else {
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2010-11-23 15:54:15 UTC (rev 1379)
+++ pkg/vegan/inst/ChangeLog 2010-11-23 15:58:39 UTC (rev 1380)
@@ -8,6 +8,11 @@
vegan. Mainly clean up and checking of functions intended for the
release.
+ * mantel.correlog: vegan mantel() was used standard order
+ statistics or (hits+1)/(nperm+1) since May 2009, but
+ mantel.correlog() did not notice the change and still tried to
+ correct the mantel() result.
+
* as.mlm.cca/rda and intersector: should get the pivoting of names
in qr.X() correct both in the current buggy R and hopefully fixed
next version 2.12.1.
More information about the Vegan-commits
mailing list