Debian Codegraph @

raster/r.regression.multi/r.regression.multi.html

raw symbols SCIP
1 <h2>DESCRIPTION</h2>
2
3 <em>r.regression.multi</em> calculates a multiple linear regression from
4 raster maps, according to the formula
5 <div class="code"><pre>
6 Y = b0 + sum(bi*Xi) + E
7 </pre></div>
8 where
9 <div class="code"><pre>
10 X = {X1, X2, ..., Xm}
11 m = number of explaining variables
12 Y = {y1, y2, ..., yn}
13 Xi = {xi1, xi2, ..., xin}
14 E = {e1, e2, ..., en}
15 n = number of observations (cases)
16 </pre></div>
17
18 In R notation:
19 <div class="code"><pre>
20 Y ~ sum(bi*Xi)
21 b0 is the intercept, X0 is set to 1
22 </pre></div>
23
24 <p>
25 <em>r.regression.multi</em> is designed for large datasets that can not
26 be processed in R. A p value is therefore not provided, because even
27 very small, meaningless effects will become significant with a large
28 number of cells. Instead it is recommended to judge by the estimator b,
29 the amount of variance explained (R squared for a given variable) and
30 the gain in AIC (AIC without a given variable minus AIC global must be
31 positive) whether the inclusion of a given explaining variable in the
32 model is justified.
33
34 <h4>The global model</h4>
35 The <em>b</em> coefficients (b0 is offset), R squared or coefficient of
36 determination (Rsq) and F are identical to the ones obtained from
37 R-stats's lm() function and R-stats's anova() function. The AIC value
38 is identical to the one obtained from R-stats's stepAIC() function
39 (in case of backwards stepping, identical to the Start value). The
40 AIC value corrected for the number of explaining variables and the BIC
41 (Bayesian Information Criterion) value follow the logic of AIC.
42
43 <h4>The explaining variables</h4>
44 R squared for each explaining variable represents the additional amount
45 of explained variance when including this variable compared to when
46 excluding this variable, that is, this amount of variance is explained
47 by the current explaining variable after taking into consideration all
48 the other explaining variables.
49 <p>
50 The F score for each explaining variable allows testing if the inclusion
51 of this variable significantly increases the explaining power of the
52 model, relative to the global model excluding this explaining variable.
53 That means that the F value for a given explaining variable is only
54 identical to the F value of the R-function <em>summary.aov</em> if the
55 given explaining variable is the last variable in the R-formula. While
56 R successively includes one variable after another in the order
57 specified by the formula and at each step calculates the F value
58 expressing the gain by including the current variable in addition to the
59 previous variables, <em>r.regression.multi</em> calculates the F-value
60 expressing the gain by including the current variable in addition to all
61 other variables, not only the previous variables.
62 <p>
63 The AIC value is identical to the one obtained from the R-function
64 stepAIC() when excluding this variable from the full model. The AIC
65 value corrected for the number of explaining variables and the BIC value
66 (Bayesian Information Criterion) value follow the logic of AIC. BIC is
67 identical to the R-function stepAIC with k = log(n). AICc is not
68 available through the R-function stepAIC.
69
70 <h2>EXAMPLE</h2>
71
72 <!-- replace with better example -->
73
74 Multiple regression with soil K-factor and elevation, aspect, and slope
75 (North Carolina dataset). Output maps are the residuals and estimates:
76
77 <div class="code"><pre>
78 g.region raster=soils_Kfactor -p
79 r.regression.multi mapx=elevation,aspect,slope mapy=soils_Kfactor \
80 residuals=soils_Kfactor.resid estimates=soils_Kfactor.estim
81 </pre></div>
82
83 <h2>SEE ALSO</h2>
84
85 <em>
86 <a href="d.correlate.html">d.correlate</a>,
87 <a href="r.regression.line.html">r.regression.line</a>,
88 <a href="r.stats.html">r.stats</a>
89 </em>
90
91 <h2>AUTHOR</h2>
92
93 Markus Metz