[GRASS-dev] Non-linear (multiple) regression in GRASS?

Markus Metz markus.metz.giswork at gmail.com
Sat Feb 21 15:21:23 PST 2015


On Sat, Feb 21, 2015 at 2:08 PM, Nikos Alexandris
<nik at nikosalexandris.net> wrote:
> Hi devs,
>
> and advanced users.  Has anyone perforned, or has plans to implement,
> non-linear (multi-) regression in GRASS  (not through R, of course)?

If it is raster based, you can use r.regression.multi to perform
non-linear (multi-) regression in GRASS. It depends on what you mean
with non-linear. E.g. if you want to perform a second-order multiple
regression with 2 predictors, the formula is in R syntax

y ~ x1 + x2 + x1 * x2 + x1 * x1 + x2 * x2

You can calculate the terms x1 * x2, x1 * x1, x2 * x2 with r.mapcalc
and feed everything to r.regression.multi.

logarithmic:
y ~ log(x1)

r.mapcalc "logx1 = log(x1)"

exponential:
y ~ exp(x1)

r.mapcalc "expx1 = exp(x1)"

A combination of say a 4th-order polynomial with exponential
components and 10 predictors could be constructed accordingly.

HTH,

Markus M

>
> Thank you, Nikos
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev


More information about the grass-dev mailing list