浏览代码

Correcting F statistic calculation

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51903 15284696-431f-4ddb-bdfa-cd5b030d7da7
Moritz Lennert 13 年之前
父节点
当前提交
ec3ab543d2
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);