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

Nikos Alexandris nik at nikosalexandris.net
Tue Feb 24 06:36:42 PST 2015


Nikos Alexandris:

>> Hi devs,
>> and advanced users.  Has anyone performed, or has plans to 
>> implement,
>> non-linear (multi-) regression in GRASS  (not through R, of course)?

Markus Metz:

> 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.

Speechless. Nikos


More information about the grass-dev mailing list