r.regression.multi(1)
π r.regression.multi β the GRASS GIS user's manual, but make it make sense π
okay bestie, so this is a page from the GRASS GIS User's Manual (that's the manual name, she's fancy), and the module is called r.regression.multi. Let's get into it π«Ά
β¨ NAME β¨
r.regression.multi β she calculates multiple linear regression from raster maps. that's it, that's the whole job, and she does it so well π
π·οΈ KEYWORDS π·οΈ
raster, statistics, regression
π SYNOPSIS π
r.regression.multi
r.regression.multi --help
r.regression.multi [-g] mapx=name[,name,...] mapy=name [residuals=name]
[estimates=name] [output=name] [--overwrite] [--help] [--verbose]
[--quiet] [--ui]
π Flags:
-gβ print in shell script style, no cap--overwriteβ allow output files to overwrite existing files (yes girl, bulldoze them)--helpβ print usage summary--verboseβ verbose module output--quietβ quiet module output--uiβ force launching GUI dialog
π¦ Parameters:
mapx=name[,name,...][required] β map for x coefficient (you can pass a whole lil list, comma-separated, she eats)mapy=name[required] β map for y coefficientresiduals=nameβ map to store residualsestimates=nameβ map to store estimatesoutput=nameβ ASCII file for storing regression coefficients (output to screen if file not specified)
π DESCRIPTION π
so r.regression.multi calculates a multiple linear regression from raster maps, according to this formula:
Y = b0 + sum(bi*Xi) + E
where
X = {X1, X2, ..., Xm}
m = number of explaining variables
Y = {y1, y2, ..., yn}
Xi = {xi1, xi2, ..., xin}
E = {e1, e2, ..., en}
n = number of observations (cases)
and in R notation:
Y ~ sum(bi*Xi)
b0 is the intercept, and X0 is set to 1. periodt β¨
r.regression.multi is designed for large datasets that can not be processed in R. and because of that, a p value is therefore not provided β like, imagine, because even very small, meaningless effects will become significant with a large number of cells π it's giving "statistically significant but who cares". Instead it is recommended to judge by the estimator b, the amount of variance explained (R squared for a given variable) and the gain in AIC (AIC without a given variable minus AIC global must be positive) whether the inclusion of a given explaining variable in the model is justified.
πΈ The global model πΈ
The b coefficients (b0 is offset), R squared or coefficient of determination (Rsq) and F are identical to the ones obtained from R-stats's lm() function and R-stats's anova() function. The AIC value is identical to the one obtained from R-stats's stepAIC() function (in case of backwards stepping, identical to the Start value). The AIC value corrected for the number of explaining variables and the BIC (Bayesian Information Criterion) value follow the logic of AIC. iconic behavior honestly π
π§ The explaining variables π§
R squared for each explaining variable represents the additional amount of explained variance when including this variable compared to when excluding this variable β that is, this amount of variance is explained by the current explaining variable after taking into consideration all the other explaining variables. she's accounting for the whole friend group, not just the last one who spoke π
The F score for each explaining variable allows testing if the inclusion of this variable significantly increases the explaining power of the model, relative to the global model excluding this explaining variable. That means that the F value for a given explaining variable is only identical to the F value of the R-function summary.aov if the given explaining variable is the last variable in the R-formula. While R successively includes one variable after another in the order specified by the formula and at each step calculates the F value expressing the gain by including the current variable in addition to the previous variables, r.regression.multi calculates the F-value expressing the gain by including the current variable in addition to all other variables, not only the previous variables. different girl, different method, no notes π«Ά
The AIC value is identical to the one obtained from the R-function stepAIC() when excluding this variable from the full model. The AIC value corrected for the number of explaining variables and the BIC value (Bayesian Information Criterion) value follow the logic of AIC. BIC is identical to the R-function stepAIC with k = log(n). AICc is not available through the R-function stepAIC. noted and filed, bestie π
π EXAMPLE π
Multiple regression with soil K-factor and elevation, aspect, and slope (North Carolina dataset). Output maps are the residuals and estimates:
g.region raster=soils_Kfactor -p
r.regression.multi mapx=elevation,aspect,slope mapy=soils_Kfactor \
residuals=soils_Kfactor.resid estimates=soils_Kfactor.estim
look at her go ππ
π SEE ALSO π
d.correlate, r.regression.line, r.stats
(the whole squad, fr fr)
π AUTHOR π
Markus Metz
πΎ SOURCE CODE πΎ
Available at: r.regression.multi source code (history)
Accessed: Saturday Jan 17 05:40:57 2026
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
okay so that's the whole page π and just so we're crystal clear on the vibe check at the very end: this whole thing lives in the GRASS 8.4.2 reference manual, and yeah, GRASS GIS 8.4.2 is the version, and the man page is r.regression.multi(1). slay, go run your regression, bestie πβ¨π¦
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms