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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 15 15:27:16 CEST 2010


Author: jarioksa
Date: 2010-04-15 15:27:15 +0200 (Thu, 15 Apr 2010)
New Revision: 1179

Modified:
   pkg/vegan/DESCRIPTION
   pkg/vegan/R/adonis.R
   pkg/vegan/inst/ChangeLog
Log:
tie handling in adonis

Modified: pkg/vegan/DESCRIPTION
===================================================================
--- pkg/vegan/DESCRIPTION	2010-03-18 17:32:36 UTC (rev 1178)
+++ pkg/vegan/DESCRIPTION	2010-04-15 13:27:15 UTC (rev 1179)
@@ -1,7 +1,7 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 1.18-3
-Date: March 8, 2010
+Version: 1.18-4
+Date: April 15, 2010
 Author: Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, 
    R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens, 
    Helene Wagner  

Modified: pkg/vegan/R/adonis.R
===================================================================
--- pkg/vegan/R/adonis.R	2010-03-18 17:32:36 UTC (rev 1178)
+++ pkg/vegan/R/adonis.R	2010-04-15 13:27:15 UTC (rev 1179)
@@ -84,14 +84,17 @@
             f.test(H.s[[i]], G[p[,j],p[,j]], I, df.Exp[i], df.Res, H.snterm)
         } )
     })
-  
+    ## Round to avoid arbitrary P-values with tied data
+    f.perms <- round(f.perms, 12)
+    F.Mod <- round(F.Mod, 12)
     SumsOfSqs = c(SS.Exp.each, SS.Res, sum(SS.Exp.each) + SS.Res)
     tab <- data.frame(Df = c(df.Exp, df.Res, n-1),
                       SumsOfSqs = SumsOfSqs,
                       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)+1)/(permutations+1), NA, NA))
+                      P = c((rowSums(t(f.perms) >= F.Mod)+1)/(permutations+1),
+                      NA, NA))
     rownames(tab) <- c(attr(attr(rhs.frame, "terms"), "term.labels")[u.grps],
                        "Residuals", "Total")
     colnames(tab)[ncol(tab)] <- "Pr(>F)"

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2010-03-18 17:32:36 UTC (rev 1178)
+++ pkg/vegan/inst/ChangeLog	2010-04-15 13:27:15 UTC (rev 1179)
@@ -2,8 +2,12 @@
 
 VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
 
-Version 1.18-3 (opened March 8, 2010)
+Version 1.18-4 (opened April 15, 2010)
 
+	* adonis: implemented tie handling in permutations. 
+
+Version 1.18-3 (closed April 15, 2010)
+
 	* new version opened with the release of vegan 1.17-2 (March 8,
 	2010). 
 



More information about the Vegan-commits mailing list