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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 12 14:10:36 CEST 2010


Author: jarioksa
Date: 2010-08-12 14:10:36 +0200 (Thu, 12 Aug 2010)
New Revision: 1248

Modified:
   pkg/vegan/DESCRIPTION
   pkg/vegan/R/mrpp.R
   pkg/vegan/R/summary.meandist.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/mrpp.Rd
Log:
John Van Sickle told us that his classification strength was misinterpreted

Modified: pkg/vegan/DESCRIPTION
===================================================================
--- pkg/vegan/DESCRIPTION	2010-08-12 07:31:44 UTC (rev 1247)
+++ pkg/vegan/DESCRIPTION	2010-08-12 12:10:36 UTC (rev 1248)
@@ -1,7 +1,7 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 1.18-8
-Date: July 19, 2010
+Version: 1.18-9
+Date: August 12, 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/mrpp.R
===================================================================
--- pkg/vegan/R/mrpp.R	2010-08-12 07:31:44 UTC (rev 1247)
+++ pkg/vegan/R/mrpp.R	2010-08-12 12:10:36 UTC (rev 1248)
@@ -30,9 +30,9 @@
     names(classdel) <- names(ncl) <- indls
     del <- weighted.mean(classdel, w = w, na.rm = TRUE)
     E.del <- mean(dmat, na.rm = TRUE)
-    ## 'Classification strength' if weight.type == 3
-    if (weight.type == 3) {
-        CS <- N*(N-1)/2*(E.del - del)/(N*(N-1)/2 - sum(w))
+    ## 'Classification strength' if weight.type == 1
+    if (weight.type == 1) {
+        CS <- mean(dmat[outer(grouping, grouping, "!=")]) - del
     } else {
         CS <- NA
     }

Modified: pkg/vegan/R/summary.meandist.R
===================================================================
--- pkg/vegan/R/summary.meandist.R	2010-08-12 07:31:44 UTC (rev 1247)
+++ pkg/vegan/R/summary.meandist.R	2010-08-12 12:10:36 UTC (rev 1248)
@@ -14,7 +14,7 @@
     A2 <- weighted.mean(diag(object), w = n - 1, na.rm = TRUE)
     A3 <- weighted.mean(diag(object), w = n * (n - 1), na.rm = TRUE)
     ##
-    out <- list(W = W, B = B, D = D, CS = B-W,
+    out <- list(W = W, B = B, D = D, CS = B-A1,
                 A1 = 1 - A1/D, A2 = 1 - A2/D, A3 = 1 - A3/D)
     class(out) <- "summary.meandist"
     out

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2010-08-12 07:31:44 UTC (rev 1247)
+++ pkg/vegan/inst/ChangeLog	2010-08-12 12:10:36 UTC (rev 1248)
@@ -2,8 +2,19 @@
 
 VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
 
-Version 1.18-8 (opened July 19, 2010)
+Version 1.18-9 (opened August 12, 2010)q
 
+	* mrpp & meandist: I had misinterpreted the classification
+	strength (CS) be based on weight.type=3 or N*(N-1)/2, but it was
+	based on weight.type=1 or N. The literature reference to CS is now
+	more appropriate. Thanks to Dr John Van Sickle (US EPA, Corvallis,
+	Oregon) for pointing out that I had misread his papers. Needs
+	still checking. For instance, MRPP statistic and CS are not
+	monotonically related with this weight.type (they were with
+	weight.type=3), and CS cannot be tested with the current function.
+
+Version 1.18-8 (closed August 12, 2010)
+
 	* DESCRIPTION: does not suggest package 'ellipse'.
 
 	* FAQ: new entry on negative or non-numeric data, and updates of

Modified: pkg/vegan/man/mrpp.Rd
===================================================================
--- pkg/vegan/man/mrpp.Rd	2010-08-12 07:31:44 UTC (rev 1247)
+++ pkg/vegan/man/mrpp.Rd	2010-08-12 12:10:36 UTC (rev 1248)
@@ -83,38 +83,39 @@
 \eqn{A = 1 -\delta/E(\delta)}, where \eqn{E(\delta)} is the expected
 \eqn{\delta} assessed as the average of permutations.
 
-With \code{weight.type = 3}, the function also calculates classification
-strength (Van Sickle 1997) which is defined as the difference between
-average between group dissimilarities and within group
-dissimilarities. With \code{weight.type = 3} the classification strength
-is a simple transformation of \eqn{\delta}, and has the same permutation
-significance.
+With \code{weight.type = 1}, the function also calculates classification
+strength (Van Sickle and Hughes 2000) which is defined as the difference
+between average between group dissimilarities and within group
+dissimilarities (with weights \eqn{n}).  With \code{weight.type = 1} the
+classification strength is closely related to the MRPP statistic
+\eqn{A}, but not exactly, and the significance values from permutation
+tests only concern \eqn{A}.
 
 If the first argument \code{dat} can be interpreted as dissimilarities,
 they will be used directly. In other cases the function treats
-\code{dat} as observations, and uses \code{\link{vegdist}} to find 
-the dissimilarities.  The default \code{distance} is Euclidean as in the
+\code{dat} as observations, and uses \code{\link{vegdist}} to find the
+dissimilarities.  The default \code{distance} is Euclidean as in the
 traditional use of the method, but other dissimilarities in
-\code{\link{vegdist}} also are available. 
+\code{\link{vegdist}} also are available.
 
 Function \code{meandist} calculates a matrix of mean within-cluster
 dissimilarities (diagonal) and between-cluster dissimilarities
 (off-diagonal elements), and an attribute \code{n} of \code{grouping}
 counts. Function \code{summary} finds the within-class, between-class
-and overall means of these dissimilarities, and the MRPP statistics
-with all \code{weight.type} options and the classification
-strength. The function does not allow significance tests for these
-statistics, but you must use \code{mrpp} with appropriate
-\code{weight.type}.  Function \code{plot} draws a dendrogram or a
-histogram of the result matrix based on the within-group and between
-group dissimilarities. The dendrogram is given with the \code{cluster}
-argument which is passed to \code{\link{hclust}}. The terminal
-segments hang to within-cluster dissimilarity. If some of the clusters
-is more heterogeneous than the combined class, the leaf segment is
-reversed.  The histogram is similar as the graphics used by Van Sickle
-(1997): horizontal line is drawn at the level of mean between-cluster
-dissimilarity and vertical lines connect within-cluster
-dissimilarities to this line.  
+and overall means of these dissimilarities, and the MRPP statistics with
+all \code{weight.type} options and the classification strength. The
+function does not allow significance tests for these statistics, but you
+must use \code{mrpp} with appropriate \code{weight.type}.  Function
+\code{plot} draws a dendrogram or a histogram of the result matrix based
+on the within-group and between group dissimilarities. The dendrogram is
+given with the \code{cluster} argument which is passed to
+\code{\link{hclust}}. The terminal segments hang to within-cluster
+dissimilarity. If some of the clusters is more heterogeneous than the
+combined class, the leaf segment is reversed.  The histogram is similar
+as the graphics used by Van Sickle and Hughes(1997), except that they
+are based on dissimilarities instead of similarities: horizontal line is
+drawn at the level of mean between-cluster dissimilarity and vertical
+lines connect within-cluster dissimilarities to this line.
 }
 
 \value{
@@ -149,10 +150,11 @@
   Distance  Function Approach.} Springer Series in
   Statistics. Springer.  
 
-  J. Van Sickle 1997. Using mean similarity dendrograms to evaluate
-  classifications. \emph{Journal of Agricultural, Biological, and Environmental
-  Statistics} 2:370-388.
+  J. Van Sickle and R. M. Hughes 2000. Classification strengths of
+  ecoregions, catchments, and geographic clusters of aquatic vertebrates
+  in Oregon. \emph{J. N. Am. Benthol. Soc.} 19:370--384.
 
+
 }
 \author{
 M. Henry H. Stevens \email{HStevens at muohio.edu} and Jari Oksanen.
@@ -164,7 +166,12 @@
 groups has a greater dissimilarities among its sampling units. Most
 \code{mrpp} models can be analysed with \code{\link{adonis}} which seems
 not suffer from the same problems as \code{mrpp} and is a more robust
-alternative. 
+alternative.
+
+Development version 1.18-8 and release version 1.17-3 and prior based
+classification strength (Van Sickle and Hughes, 2000) on
+\code{weight.type=3}, but the original paper clearly used
+\code{weight.type=1} (corrected on August 12, 2010).
 }
 \seealso{
   \code{\link{anosim}} for a similar test based on ranks, and



More information about the Vegan-commits mailing list