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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 5 13:13:29 CET 2011


Author: jarioksa
Date: 2011-01-05 13:13:29 +0100 (Wed, 05 Jan 2011)
New Revision: 1435

Modified:
   pkg/vegan/R/capscale.R
   pkg/vegan/inst/ChangeLog
Log:
do not add negative eigenvalues to the capscale result

Modified: pkg/vegan/R/capscale.R
===================================================================
--- pkg/vegan/R/capscale.R	2011-01-05 12:09:47 UTC (rev 1434)
+++ pkg/vegan/R/capscale.R	2011-01-05 12:13:29 UTC (rev 1435)
@@ -89,12 +89,10 @@
     if (!is.null(sol$CA)) {
         colnames(sol$CA$u) <- names(sol$CA$eig) <- colnames(sol$CA$v) <-
             paste("MDS", 1:ncol(sol$CA$u), sep = "")
-        ## Add negative eigenvalues to the list and update tot.chi
+        ## update for negative eigenvalues
         poseig <- length(sol$CA$eig)
         if (any(X$eig < 0)) {
             negax <- X$eig[X$eig < 0]
-            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$CA$imaginary.rank <- length(negax)

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2011-01-05 12:09:47 UTC (rev 1434)
+++ pkg/vegan/inst/ChangeLog	2011-01-05 12:13:29 UTC (rev 1435)
@@ -17,13 +17,15 @@
 	a new item of "Real Total" that gives the sum of eigenvalues
 	without the imaginary component, and the proportions are given
 	only within this real component (if there are negative
-	eigenvalues).  However, summary.eigenvals() estimates the
-	proportions explained using absolute values of eigenvalues since
-	this seems to make sense there (the proportion explained is now
-	based on absolute eigenvalues to give more sensible
-	output). Moreover, wcmdscale() will now always give goodness of
-	fit (GOF) as NA, since I have no clue how to calculate GOF
-	meaningfully in PCoA.
+	eigenvalues).  The eigenvalues of negative eigenvalues are not
+	added to the result, because they are not strictly for the
+	unconstrained component only like previously indicated. However,
+	summary.eigenvals() estimates the proportions explained using
+	absolute values of eigenvalues since this seems to make sense
+	there (the proportion explained is now based on absolute
+	eigenvalues to give more sensible output). Moreover, wcmdscale()
+	will now always give goodness of fit (GOF) as NA, since I have no
+	clue how to calculate GOF meaningfully in PCoA.
 
 Version 1.18-19 (closed January 3, 2011)
 



More information about the Vegan-commits mailing list