[GRASS-SVN] r42515 - grass/branches/releasebranch_6_4/scripts/r.regression.line

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 8 12:53:51 EDT 2010


Author: hamish
Date: 2010-06-08 12:53:51 -0400 (Tue, 08 Jun 2010)
New Revision: 42515

Modified:
   grass/branches/releasebranch_6_4/scripts/r.regression.line/r.regression.line
Log:
rename variable from italian so it doesn't get confused with median, add F-test to key (merge from devbr6)

Modified: grass/branches/releasebranch_6_4/scripts/r.regression.line/r.regression.line
===================================================================
--- grass/branches/releasebranch_6_4/scripts/r.regression.line/r.regression.line	2010-06-08 16:53:16 UTC (rev 42514)
+++ grass/branches/releasebranch_6_4/scripts/r.regression.line/r.regression.line	2010-06-08 16:53:51 UTC (rev 42515)
@@ -112,10 +112,10 @@
 }\
 END {B=(sumXY - sumX*sumY/tot)/(sumsqX - sumX*sumX/tot);\
 R= (sumXY - sumX*sumY/tot)/((sumsqX - sumX^2/tot)*(sumsqY - sumY^2/tot))^0.5;\
-mediaX=sumX/tot;sumsqX=sumsqX/tot;varX=sumsqX-(mediaX^2);sdX=varX^0.5;\
-mediaY=sumY/tot;sumsqY=sumsqY/tot;varY=sumsqY-(mediaY^2);sdY=varY^0.5;\
-A=mediaY - B*mediaX; F= R^2/(1-R^2/tot-2);\
-print A, B, R, tot, F, mediaX, sdX, mediaY, sdY}' "$TEMPFILE" > "$TEMPFILE"b
+meanX=sumX/tot; sumsqX=sumsqX/tot; varX=sumsqX-(meanX^2); sdX=varX^0.5;\
+meanY=sumY/tot; sumsqY=sumsqY/tot; varY=sumsqY-(meanY^2); sdY=varY^0.5;\
+A=meanY - B*meanX; F= R^2/(1-R^2/tot-2);\
+print A, B, R, tot, F, meanX, sdX, meanY, sdY}' "$TEMPFILE" > "$TEMPFILE"b
 
 echo "a b R N F medX sdX medY sdY" | tr -s ' ' '\n' > "$TEMPFILE"d
 cat "$TEMPFILE"b | tr -s ' ' '\n' > "$TEMPFILE"e
@@ -131,6 +131,7 @@
            echo "   b: gain"
            echo "   R: sumXY - sumX*sumY/tot"
            echo "   N: number of elements"
+	   echo "   F: F-test significance"
            echo "   medX, medY: Means"
            echo "   sdX, sdY: Standard deviations"
            echo "a  b  R  N  F medX  sdX  medY  sdY"
@@ -146,6 +147,7 @@
            echo "   b: gain" >> "$TEMPFILE"c
            echo "   R: sumXY - sumX*sumY/tot" >> "$TEMPFILE"c
            echo "   N: number of elements" >> "$TEMPFILE"c
+	   echo "   F: F-test significance" >> "$TEMPFILE"c
            echo "   medX, medY: Means" >> "$TEMPFILE"c
            echo "   sdX, sdY: Standard deviations" >> "$TEMPFILE"c
            echo "a  b  R  N  F medX  sdX  medY  sdY" >> "$TEMPFILE"c



More information about the grass-commit mailing list