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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 10 10:02:24 CET 2010


Author: jarioksa
Date: 2010-11-10 10:02:23 +0100 (Wed, 10 Nov 2010)
New Revision: 1359

Modified:
   pkg/vegan/R/capscale.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/capscale.Rd
Log:
capscale: total inertia is the sum of *absolute* values of eigenvalues

Modified: pkg/vegan/R/capscale.R
===================================================================
--- pkg/vegan/R/capscale.R	2010-11-10 08:46:24 UTC (rev 1358)
+++ pkg/vegan/R/capscale.R	2010-11-10 09:02:23 UTC (rev 1359)
@@ -94,7 +94,7 @@
             names(negax) <- paste("NEG", seq_along(negax), sep="")
             sol$CA$eig <- c(sol$CA$eig, negax)
             sol$CA$imaginary.chi <- sum(negax)
-            sol$tot.chi <- sol$tot.chi + sol$CA$imaginary.chi
+            sol$tot.chi <- sol$tot.chi + abs(sol$CA$imaginary.chi)
             sol$CA$imaginary.rank <- length(negax)
             sol$CA$imaginary.u.eig <- X$negaxes
         }

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2010-11-10 08:46:24 UTC (rev 1358)
+++ pkg/vegan/inst/ChangeLog	2010-11-10 09:02:23 UTC (rev 1359)
@@ -4,6 +4,10 @@
 
 Version 1.18-16 (opened November 9, 20109
 
+	* capscale: defines total inertia as the sum of absolute values of
+	eigenvalues to be consistent with cmdscale(), wcmdscale(),
+	eigenvals(), Gower and Mardia, Kent & Bibby.
+
 	* eigenvals: added a method for "pcnm" and docs discuss handling
 	negative eigenvalues in summary.eigenvals().
 

Modified: pkg/vegan/man/capscale.Rd
===================================================================
--- pkg/vegan/man/capscale.Rd	2010-11-10 08:46:24 UTC (rev 1358)
+++ pkg/vegan/man/capscale.Rd	2010-11-10 09:02:23 UTC (rev 1359)
@@ -169,8 +169,8 @@
   dissimilarity indices. The non-Euclidean component of inertia is
   given under the title \code{Imaginary}, and the negative eigenvalues
   are listed after unconstrained eigenvalues with prefix \code{NEG}.
-  The total inertia is the sum of all eigenvalues, including negative
-  ones (Gower 1985). No ordination scores are given for negative
+  The total inertia is the sum of absolute values of all eigenvalues
+  (Gower 1985). No ordination scores are given for negative
   eigenvalues.  If the negative eigenvalues are disturbing, you can
   use argument \code{add = TRUE} passed to \code{\link{cmdscale}}, or,
   preferably, a distance measure that does not cause these warnings.



More information about the Vegan-commits mailing list