Przeglądaj źródła

Correcting F statistic calculation

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51903 15284696-431f-4ddb-bdfa-cd5b030d7da7
Moritz Lennert 13 lat temu
rodzic
commit
ec3ab543d2
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      raster/r.regression.line/main.c

+ 1 - 1
raster/r.regression.line/main.c

@@ -129,7 +129,7 @@ int main(int argc, char *argv[])
     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);