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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri May 29 23:06:27 CEST 2009


Author: gsimpson
Date: 2009-05-29 23:06:27 +0200 (Fri, 29 May 2009)
New Revision: 834

Modified:
   pkg/vegan/R/protest.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/procrustes.Rd
Log:
observed statistic in protest() considered as one of the permutations; reduces the default permutations by 1 to account for this

Modified: pkg/vegan/R/protest.R
===================================================================
--- pkg/vegan/R/protest.R	2009-05-28 13:09:38 UTC (rev 833)
+++ pkg/vegan/R/protest.R	2009-05-29 21:06:27 UTC (rev 834)
@@ -1,5 +1,5 @@
 "protest" <-
-    function (X, Y, scores = "sites", permutations = 1000, strata, ...) 
+    function (X, Y, scores = "sites", permutations = 999, strata, ...)
 {
     X <- scores(X, display = scores, ...)
     Y <- scores(Y, display = scores, ...)
@@ -12,6 +12,8 @@
         tmp <- procrustes(X, Y[take, ], symmetric = TRUE)$ss
         perm[i] <- sqrt(1 - tmp)
     }
+    perm <- c(sol$t0, perm)
+    permutations <- permutations + 1
     Pval <- sum(perm >= sol$t0)/permutations
     if (!missing(strata)) {
         strata <- deparse(substitute(strata))

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2009-05-28 13:09:38 UTC (rev 833)
+++ pkg/vegan/inst/ChangeLog	2009-05-29 21:06:27 UTC (rev 834)
@@ -19,6 +19,10 @@
 	princomp, eigen and svd. For svd returns squares of singular
 	values, and for prcomp and princomp squares of 'sdev'.
 
+	* protest: observed value of test statistic is now considered as
+	one of the permutations. Default N.perm decreased to 999 to account
+	for this.
+
 Version 1.16-18 (closed May 14, 2009)
 
 	* tsallis: got new argument 'hill' similar to that of renyi.

Modified: pkg/vegan/man/procrustes.Rd
===================================================================
--- pkg/vegan/man/procrustes.Rd	2009-05-28 13:09:38 UTC (rev 833)
+++ pkg/vegan/man/procrustes.Rd	2009-05-29 21:06:27 UTC (rev 834)
@@ -28,7 +28,7 @@
 \method{lines}{procrustes}(x, type = c("segments", "arrows"), choices = c(1, 2), ...)  
 \method{residuals}{procrustes}(object, ...)
 \method{fitted}{procrustes}(object, truemean = TRUE, ...)
-protest(X, Y, scores = "sites", permutations = 1000, strata, ...)
+protest(X, Y, scores = "sites", permutations = 999, strata, ...)
 }
 
 \arguments{



More information about the Vegan-commits mailing list