[Vegan-commits] r669 - in pkg/vegan: . R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 20 10:47:14 CET 2009


Author: jarioksa
Date: 2009-01-20 10:47:14 +0100 (Tue, 20 Jan 2009)
New Revision: 669

Modified:
   pkg/vegan/DESCRIPTION
   pkg/vegan/R/kendall.global.R
   pkg/vegan/R/kendall.post.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/kendall.global.Rd
Log:
kendall: uses all p.adjust alternatives; version to 1.16-10

Modified: pkg/vegan/DESCRIPTION
===================================================================
--- pkg/vegan/DESCRIPTION	2009-01-20 09:20:18 UTC (rev 668)
+++ pkg/vegan/DESCRIPTION	2009-01-20 09:47:14 UTC (rev 669)
@@ -1,7 +1,7 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 1.16-9
-Date: Januay 7, 2009
+Version: 1.16-10
+Date: Januay 20, 2009
 Author: Jari Oksanen, Roeland Kindt, Pierre Legendre, Bob O'Hara, Gavin L. Simpson, 
    Peter Solymos, M. Henry H. Stevens, Helene Wagner  
 Maintainer: Jari Oksanen <jari.oksanen at oulu.fi>

Modified: pkg/vegan/R/kendall.global.R
===================================================================
--- pkg/vegan/R/kendall.global.R	2009-01-20 09:20:18 UTC (rev 668)
+++ pkg/vegan/R/kendall.global.R	2009-01-20 09:47:14 UTC (rev 669)
@@ -7,7 +7,7 @@
 ### copyleft - Guillaume Blanchet and Pierre Legendre, October 2008
 ################################################################################
 	
-    mult <- match.arg(mult, c("sidak", "holm", "bonferroni"))
+    mult <- match.arg(mult, c("sidak", p.adjust.methods))
 	
     ##CC# Make sure Y is a matrix and find number of rows and columns of Y
     Y <- as.matrix(Y)
@@ -85,15 +85,10 @@
             prob.F.corr <- NA
             for(i in 1:ngr) prob.F.corr = c(prob.F.corr, (1-(1-prob.F.gr[i])^ngr))
             prob.F.corr <- prob.F.corr[-1]
+        } else {
+            perm.corr <- p.adjust(prob.perm.gr, method=mult)
+            prob.F.corr <- p.adjust(prob.F.gr, method=mult)
         }
-        if(mult == "holm") {
-            perm.corr <- p.adjust(prob.perm.gr, method="holm")
-            prob.F.corr <- p.adjust(prob.F.gr, method="holm")
-        }
-        if(mult == "bonferroni") {
-            perm.corr <- p.adjust(prob.perm.gr, method="bonferroni")
-            prob.F.corr <- p.adjust(prob.F.gr, method="bonferroni")
-        }
     }
     ## Create a data frame containing the results
     if(ngr == 1) {

Modified: pkg/vegan/R/kendall.post.R
===================================================================
--- pkg/vegan/R/kendall.post.R	2009-01-20 09:20:18 UTC (rev 668)
+++ pkg/vegan/R/kendall.post.R	2009-01-20 09:47:14 UTC (rev 669)
@@ -6,9 +6,9 @@
 ###
 ### copyleft - Guillaume Blanchet and Pierre Legendre, October 2008
 ################################################################################
+
+    mult <- match.arg(mult, c("sidak", p.adjust.methods))
 	
-    mult <- match.arg(mult, c("sidak", "holm", "bonferroni"))
-	
     ##CC# Make sure Y is a matrix and find number of rows and columns of Y
     Y <- as.matrix(Y)
     n <- nrow(Y)
@@ -102,9 +102,9 @@
         vec.corr = NA
         for(i in 1:p) vec.corr = c(vec.corr, (1-(1-vec[i])^p))
         vec.corr <- vec.corr[-1]
+    } else {
+        vec.corr <- p.adjust(vec, method=mult)
     }
-    if(mult == "holm") vec.corr <- p.adjust(vec, method="holm")
-    if(mult == "bonferroni") vec.corr <- p.adjust(vec, method="bonferroni")
 
     if(ngr > 1) {
         vec.gr <- vector("list",ngr)

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2009-01-20 09:20:18 UTC (rev 668)
+++ pkg/vegan/inst/ChangeLog	2009-01-20 09:47:14 UTC (rev 669)
@@ -2,8 +2,13 @@
 
 VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
 
-Version 1.16-9 (opened Jan 7, 2009)
+Version 1.6-10 (openen Jan 20, 2009)
 
+	* kendall.post, kendall.global: knows now all P value adjustment
+	methods of 'p.adjust()' plus "sidak".
+	
+Version 1.16-9 (closed Jan 20, 2009)
+	
 	* kendall.post: added one line that was accidentally lost in
 	editing. 
 

Modified: pkg/vegan/man/kendall.global.Rd
===================================================================
--- pkg/vegan/man/kendall.global.Rd	2009-01-20 09:20:18 UTC (rev 668)
+++ pkg/vegan/man/kendall.global.Rd	2009-01-20 09:47:14 UTC (rev 669)
@@ -35,10 +35,11 @@
     group. }
   \item{nperm}{ Number of permutations to be performed. Default is
     999. }
-  \item{mult}{ Correct P-values for multiple testing. The methods are
-    "holm", "sidak", and "bonferroni". The Bonferroni correction is
-    overly conservative; it is not recommended. It is included to
-    allow comparisons with the other methods. }
+  \item{mult}{Correct P-values for multiple testing using the
+    alternatives described in \code{\link{p.adjust}} and in addition
+    \code{"sidak"} (see Details). The Bonferroni correction is overly
+    conservative; it is not recommended. It is included to allow
+    comparisons with the other methods.}
 }
 \details{
   \code{Y} must contain quantitative data. They will be transformed to
@@ -81,25 +82,11 @@
   The corrections used for multiple testing are applied to the list of
   P-values (P); they take into account the number of tests (k) carried
   out simulatenously (number of groups in \code{kendall.global}, or
-  number of species in \code{kendall.post}).
-
-  The Holm correction is computed after ordering the P-values in a
-  list with the smallest value to the left. Compute adjusted P-values
-  as:
-    \eqn{P_{corr} = (k-i+1) P}{P_corr = (k-i+1)*P}
-
-  where i is the position in the ordered list. Final step: from left
-  to right, if an adjusted \eqn{P_corr} in the ordered list is smaller
-  than the one occurring at its left, make the smallest one equal to
-  the largest one.
-
-  The \enc{Šidák}{Sidak} correction is:
-
-     \eqn{P_{corr} = 1 - (1 - P)^k}
-
-  The Bonferonni correction is:
-
-   \eqn{P_{corr} = k P}{P_corr = k*P}
+  number of species in \code{kendall.post}). The corrections are
+  performed using funtion \code{\link{p.adjust}}; see that function
+  for the describtion of the correction methods. In addition, there is
+  \enc{Šidák}{Sidak} correction which defined as 
+  \eqn{P_{corr} = 1 -(1 - P)^k}.
 }
 \value{
 



More information about the Vegan-commits mailing list