Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 2086

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: r.regression.line</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>r.regression.line</b></em>  - Calculates linear regression from two raster maps: y = a + b*x
<h2>KEYWORDS</h2>
raster, statistics
<h2>SYNOPSIS</h2>
<b>r.regression.line</b><br>
<b>r.regression.line help</b><br>
<b>r.regression.line</b> [-<b>g</b>] <b>map1</b>=<em>string</em> <b>map2</b>=<em>string</em>  [<b>output</b>=<em>string</em>]   [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>-g</b></DT>
<DD>Print in shell script style</DD>

<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>map1</b>=<em>string</em></DT>
<DD>Map for x coefficient</DD>

<DT><b>map2</b>=<em>string</em></DT>
<DD>Map for y coefficient</DD>

<DT><b>output</b>=<em>string</em></DT>
<DD>ASCII file for storing regression coefficients (output to screen if file not specified).</DD>

</DL>
<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).
<br>

<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: 2007-12-17 14:53:55 +0100 (Mon, 17 Dec 2007) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="raster.html">raster index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>