[Vegan-commits] r636 - in branches/1.15: R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 16 18:25:25 CET 2008


Author: jarioksa
Date: 2008-12-16 18:25:25 +0100 (Tue, 16 Dec 2008)
New Revision: 636

Modified:
   branches/1.15/R/permatswap.R
   branches/1.15/inst/ChangeLog
   branches/1.15/man/permatfull.Rd
Log:
brances/1.15 version of permatswap got a warning() because the methods appeared dubious in tests of PS & JO

Modified: branches/1.15/R/permatswap.R
===================================================================
--- branches/1.15/R/permatswap.R	2008-12-11 02:26:13 UTC (rev 635)
+++ branches/1.15/R/permatswap.R	2008-12-16 17:25:25 UTC (rev 636)
@@ -2,6 +2,7 @@
 `permatswap` <-
 function(m, reg=NULL, hab=NULL, mtype="count", method="swap", times=100, burnin = 10000, thin = 1000)
 {
+    warning("permatswap code is experimental, and may not yield random Null models.\nAvoid using permatswap except to study its properties.")
     if (!identical(all.equal(m, round(m)), TRUE))
        stop("function accepts only integers (counts)")
     mtype <- match.arg(mtype, c("prab", "count"))

Modified: branches/1.15/inst/ChangeLog
===================================================================
--- branches/1.15/inst/ChangeLog	2008-12-11 02:26:13 UTC (rev 635)
+++ branches/1.15/inst/ChangeLog	2008-12-16 17:25:25 UTC (rev 636)
@@ -5,6 +5,9 @@
 
 Version 1.15-1 (opened October 10, 2008)
 
+	* added warning on permatswap, since the "swap" algorithm used
+	there appeared to be biased in tests run by PS & JO.
+
 	* merged r598: text.decorana failed.
 
 	* merged r590: betadisper and related functions now work when

Modified: branches/1.15/man/permatfull.Rd
===================================================================
--- branches/1.15/man/permatfull.Rd	2008-12-11 02:26:13 UTC (rev 635)
+++ branches/1.15/man/permatfull.Rd	2008-12-16 17:25:25 UTC (rev 636)
@@ -20,9 +20,9 @@
 
 \usage{
 permatfull(m, fixedmar = "both", reg = NULL, 
-hab = NULL, mtype = "count", times = 100)
+  hab = NULL, mtype = "count", times = 100)
 permatswap(m, reg = NULL, hab = NULL, mtype = "count", 
-method = "swap", times = 100, burnin = 10000, thin = 1000)
+  method = "swap", times = 100, burnin = 10000, thin = 1000)
 \method{plot}{permat}(x, ...)
 \method{summary}{permat}(object, ...)
 \method{print}{summary.permat}(x, digits = 2, ...)
@@ -53,11 +53,18 @@
 algorithms of \code{\link{commsimulator}} are used for \code{"none", "rows", "columns", "both"} values 
 of the \code{fixedmar} argument, respectively 
 
-The function \code{permatswap} is useful when matrix fill (i.e. the proportion of empty cells) should be kept constant.
-\code{permatswap} uses different kinds of swap algorithms, and row and columns sums are fixed in all cases.
-For presence-absence data, the \code{swap} and \code{tswap} methods of \code{\link{commsimulator}} can be used.
-For count data, a special swap algorithm ('swapcount') is implemented that results in permuted matrices with
-fixed marginals and matrix fill at the same time.
+The function \code{permatswap} is useful when matrix fill (i.e. the
+proportion of empty cells) should be kept constant.  \code{permatswap}
+uses different kinds of swap algorithms, and row and columns sums are
+fixed in all cases.  For presence-absence data, the \code{swap} and
+\code{tswap} methods of \code{\link{commsimulator}} can be used.  For
+count data, an experimental swap algorithm ('swapcount') is
+implemented that results in permuted matrices with fixed marginals and
+matrix fill at the same time. However, it seems that this model may
+not give true random matrices, and its use should be avoided in
+generating Null hypotheses. The code is provided only for methods
+comparisons, and may be removed from the future versions of
+\pkg{vegan}.
 
 The 'swapcount' algorithm tries to find 2x2 submatrices (identified by 2 random row and 2 random column indices), that
 can be swapped in order to leave column and row totals and fill unchanged. First, the algorithm finds the largest value



More information about the Vegan-commits mailing list