.TH r.regression.line 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBr.regression.line\fR\fR - Calculates linear regression from two raster maps: y = a + b*x. .SH KEYWORDS raster, statistics .SH SYNOPSIS \fBr.regression.line\fR .br \fBr.regression.line help\fR .br \fBr.regression.line\fR [\-\fBgs\fR] \fBmap1\fR=\fIname\fR \fBmap2\fR=\fIname\fR [\fBoutput\fR=\fIname\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Flags: .IP "\fB\-g\fR" 4m .br Print in shell script style .IP "\fB\-s\fR" 4m .br This does nothing. It is retained for backwards compatibility .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .PP .SS Parameters: .IP "\fBmap1\fR=\fIname\fR" 4m .br Map for x coefficient .IP "\fBmap2\fR=\fIname\fR" 4m .br Map for y coefficient .IP "\fBoutput\fR=\fIname\fR" 4m .br ASCII file for storing regression coefficients (output to screen if file not specified). .PP .SH DESCRIPTION \fIr.regression.line\fR 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), correlation coefficient (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). .SH NOTES The results for offset/intercept (a) and gain/slope (b) are identical to that obtained from R-stats's lm() function. .SH EXAMPLE Comparison of the old and the new DEM in Spearfish: \fC .DS .br g.region rast=elevation.10m \-p .br r.regression.line map1=elevation.dem map2=elevation.10m .br .DE \fR .PP Using the script style flag AND \fIeval\fR to make results available in the shell: \fC .DS .br g.region rast=elevation.10m \-p .br eval \(gar.regression.line \-g map1=elevation.dem map2=elevation.10m\(ga .br echo $a .br 479.615 .br .br echo $b .br 0.645631 .br .br echo $R .br 0.804441 .br .DE \fR .SH AUTHOR 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 .br Conversion to C module Markus Metz .PP \fILast changed: $Date: 2013-09-14 04:52:51 +0200 (Sat, 14 Sep 2013) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team