[Vegan-commits] r1355 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Nov 9 10:23:49 CET 2010
Author: jarioksa
Date: 2010-11-09 10:23:48 +0100 (Tue, 09 Nov 2010)
New Revision: 1355
Modified:
pkg/vegan/R/procrustes.R
pkg/vegan/inst/ChangeLog
Log:
Procrustes translation needs scale: fix by Christian Dudel
Modified: pkg/vegan/R/procrustes.R
===================================================================
--- pkg/vegan/R/procrustes.R 2010-11-09 08:44:12 UTC (rev 1354)
+++ pkg/vegan/R/procrustes.R 2010-11-09 09:23:48 UTC (rev 1355)
@@ -29,10 +29,13 @@
c <- sum(sol$d)/ctrace(Y)
}
Yrot <- c * Y %*% A
- b <- xmean - t(A %*% ymean)
+ ## Translation (b) needs scale (c) although Mardia et al. do not
+ ## have this. Reported by Christian Dudel.
+ b <- xmean - c * ymean %*% A
R2 <- ctrace(X) + c * c * ctrace(Y) - 2 * c * sum(sol$d)
reslt <- list(Yrot = Yrot, X = X, ss = R2, rotation = A,
- translation = b, scale = c, symmetric = symmetric, call = match.call())
+ translation = b, scale = c, symmetric = symmetric,
+ call = match.call())
reslt$svd <- sol
class(reslt) <- "procrustes"
return(reslt)
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2010-11-09 08:44:12 UTC (rev 1354)
+++ pkg/vegan/inst/ChangeLog 2010-11-09 09:23:48 UTC (rev 1355)
@@ -4,6 +4,10 @@
Version 1.18-15 (opened November 1, 2010)
+ * procrustes: 'translation' needs to take into account 'scale',
+ although Mardia et al. omit it. Reported, analysed and fix
+ suggested by Christian Dudel (Bochum).
+
* fitspecaccum: uses now new SS-models for species-area
relationship and several of standard SS-models for
nls(). Placeholders for documentation added. Has a plot()
More information about the Vegan-commits
mailing list