1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <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.
- The result includes the following coefficients:
- offset/intercept (a) and gain/slope (b), residuals (R),
- number of elements (N), means (medX, medY), standard deviations
- (sdX, sdY), and the F test for testing the significance of the
- regression model as a whole (F).
- <H2>NOTES</H2>
- The flag <em>-s</em> select the slower method (applies to FP maps only)
- which writes out all pixel values individually to the temporary file.
- The results for offset/intercept (a) and gain/slope (b) are then
- identical to that obtained from R-stats's lm() function.
- <H2>EXAMPLE</H2>
- Comparison of the old and the new DEM in Spearfish:
- <div class="code"><pre>
- g.region rast=elevation.10m -p
- r.regression.line map1=elevation.dem map2=elevation.10m
- </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 rast=elevation.10m -p
- eval `r.regression.line -g map1=elevation.dem map2=elevation.10m`
- echo $a
- 479.615
- echo $b
- 0.645631
- echo $R
- 0.804441
- </pre></div>
- <H2>AUTHOR</H2>
- Dr. Agustin Lobo - alobo at ija.csic.es<BR>
- Updated to GRASS 5.7 Michael Barton, Arizona State University<BR>
- Script style output Markus Neteler
- <p><i>Last changed: $Date$</i>
|