[Vegan-commits] r289 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Mar 26 21:42:41 CET 2008
Author: jarioksa
Date: 2008-03-26 21:42:41 +0100 (Wed, 26 Mar 2008)
New Revision: 289
Modified:
pkg/R/varpart4.R
Log:
varpart4 could give wrong results if called directly bypassing varpart
Modified: pkg/R/varpart4.R
===================================================================
--- pkg/R/varpart4.R 2008-03-26 09:02:06 UTC (rev 288)
+++ pkg/R/varpart4.R 2008-03-26 20:42:41 UTC (rev 289)
@@ -24,12 +24,12 @@
stop("Y and X3 do not have the same number of rows")
if (n4 != n)
stop("Y and X4 do not have the same number of rows")
- SS.Y <- sum(Y * Y)
Y <- scale(Y, center = TRUE, scale = FALSE)
X1 <- scale(X1, center = TRUE, scale = TRUE)
X2 <- scale(X2, center = TRUE, scale = TRUE)
X3 <- scale(X3, center = TRUE, scale = TRUE)
X4 <- scale(X4, center = TRUE, scale = TRUE)
+ SS.Y <- sum(Y * Y)
dummy <- simpleRDA2(Y, X1, SS.Y)
aeghklno.ua <- dummy$Rsquare
m1 <- dummy$m
More information about the Vegan-commits
mailing list