[GRASS-dev] [grass-doc I][552] Comments upon the
"r.regression.line" script.
grass-dev at lists.osgeo.org
grass-dev at lists.osgeo.org
Tue Dec 4 21:04:36 EST 2007
doc I item #552, was opened at 2007-12-05 02:04
Status: Open
Priority: 3
Submitted By: Nikos Alexandris (nikosa)
Assigned to: Nobody (None)
Summary: Comments upon the "r.regression.line" script.
Issue status: None
Doc section: raster
GRASS version: CVS HEAD
Doc timestamp (YYMMDD):
Initial Comment:
Some comments upon the "r.regression.line" documentation (and script!)
(The formula of a regression line is, as given in the script is: y = a + b*x.)
(1) The terminology used in this script is a bit unconventional but makes more or less sense.
"a", which is the incept, is called offset and "b", which is the slope, is called gain.
---
(2) Among the results printed out after running the script (Line 105: echo "a b R N F medX sdX medY sdY")
F is not explained anywhere.
Within the script (line 86) it is defined as F= R^2/(1-R^2/tot-2)
---
(3) Line 101 prints out:
echo " R: sumXY - sumX*sumY/tot"
which is actually half of the formula for Pearson's correlation coefficient "r" [ as correctly expressed in line 83: R= (sumXY - sumX*sumY/tot)/((sumsqX - sumX^2/tot)*(sumsqY - sumY^2/tot))^0.5 ]
---
(4) Line 103 prints out:
echo " medX, medY: Medians"
allthough the "mean" is (correctly) used in the script (in lines 84 and 85, mediaX=sumX/tot and mediaY=sumY/tot respectively), it's incorrectly (?) named as "median".
---
----------------------------------------------------------------------
You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=207&aid=552&group_id=21
More information about the grass-dev
mailing list