[GRASS-SVN] r66606 - grass/trunk/raster/r.regression.line

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 26 06:42:46 PDT 2015


Author: neteler
Date: 2015-10-26 06:42:45 -0700 (Mon, 26 Oct 2015)
New Revision: 66606

Modified:
   grass/trunk/raster/r.regression.line/r.regression.line.html
Log:
r.regression.line manual: update example to NC dataset; HTML cosmetics

Modified: grass/trunk/raster/r.regression.line/r.regression.line.html
===================================================================
--- grass/trunk/raster/r.regression.line/r.regression.line.html	2015-10-26 13:30:43 UTC (rev 66605)
+++ grass/trunk/raster/r.regression.line/r.regression.line.html	2015-10-26 13:42:45 UTC (rev 66606)
@@ -1,8 +1,18 @@
 <h2>DESCRIPTION</h2>
 
-<em>r.regression.line</em> Calculates linear regression from two raster maps, 
-according to the formula y = a + b*x, where x and y represent raster maps. 
-Optionally saves regression coefficients to an ASCII file. 
+<em>r.regression.line</em> calculates a linear regression from two
+raster maps, according to the formula
+<div class="code"><pre>
+y = a + b*x
+</pre></div>
+where
+<div class="code"><pre>
+x
+y
+</pre></div>
+represent the input raster maps.
+<p>
+Optionally, it saves regression coefficients as a ASCII file. 
 The result includes the following coefficients:
 offset/intercept (a) and gain/slope (b), correlation coefficient (R),
 number of elements (N), means (medX, medY), standard deviations
@@ -15,29 +25,43 @@
 
 <h2>EXAMPLE</h2>
 
-Comparison of the old and the new DEM in Spearfish:
+Comparison of two DEMs (SRTM and NED, both at 30m resolution),
+provided in the North Carolina sample dataset:
+
 <div class="code"><pre>
-g.region raster=elevation.10m -p
-r.regression.line map1=elevation.dem map2=elevation.10m
+g.region raster=elev_srtm_30m -p
+r.regression.line mapx=elev_ned_30m mapy=elev_srtm_30m 
+ y = a + b*x
+   a (Offset): -1.659279
+   b (Gain): 1.043968
+   R (sumXY - sumX*sumY/N): 0.894038
+   N (Number of elements): 225000
+   F (F-test significance): 896093.366283
+   meanX (Mean of map1): 110.307571
+   sdX (Standard deviation of map1): 20.311998
+   meanY (Mean of map2): 113.498292
+   sdY (Standard deviation of map2): 23.718307
 </pre></div>
 <p>
 Using the script style flag AND <em>eval</em> to make results
 available in the shell:
 <div class="code"><pre>
-g.region raster=elevation.10m -p
-eval `r.regression.line -g map1=elevation.dem map2=elevation.10m`
+g.region raster=elev_srtm_30m -p
+eval `r.regression.line -g mapx=elev_ned_30m mapy=elev_srtm_30m`
+
+# print result stored in respective variables
 echo $a
-479.615
+-1.659279
 
 echo $b
-0.645631
+1.043968
 
 echo $R
-0.804441
+0.894038
 </pre></div>
 
 
-<h2>AUTHOR</h2>
+<h2>AUTHORS</h2>
 
 Dr. Agustin Lobo - alobo at ija.csic.es<br>
 Updated to GRASS 5.7 Michael Barton, Arizona State University<br>



More information about the grass-commit mailing list