[GRASS-SVN] r51904 - grass/branches/develbranch_6/raster/r.regression.line

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 31 06:16:46 PDT 2012


Author: mlennert
Date: 2012-05-31 06:16:46 -0700 (Thu, 31 May 2012)
New Revision: 51904

Modified:
   grass/branches/develbranch_6/raster/r.regression.line/main.c
Log:
Correcting F statistic calculation 


Modified: grass/branches/develbranch_6/raster/r.regression.line/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.regression.line/main.c	2012-05-31 13:10:55 UTC (rev 51903)
+++ grass/branches/develbranch_6/raster/r.regression.line/main.c	2012-05-31 13:16:46 UTC (rev 51904)
@@ -139,7 +139,7 @@
     sdY = sqrt(varY);
 
     A = meanY - B * meanX;
-    F = R * R / (1 - R * R / count - 2);
+    F = R * R / ((1 - R * R) / (count - 2));
 
     if (shell_style->answer) {
 	fprintf(stdout, "a=%f\n", A);



More information about the grass-commit mailing list