[STATSGRASS] gstat - trend over 3th polinominal

Edzer J. Pebesma e.pebesma at geo.uu.nl
Sat Nov 11 07:43:42 EST 2006


Jarek, we don't know what your "newdata" object is. It is a name of an 
argument, but passed as data; I would expect something like

predict(g, newdata = meuse.grid)

I didn't know of that form in formulas, so thanks! Pretty much shorter 
than writing the 4th order polynomial out.

It might work "in principle" but you may expect increasing inaccuracies 
with higher order trends due to the large difference between say x^4 and 
x. Rescaling the coordinates prior to the analysis (e.g. dividing by 
1000, going from m to km) might help. poly() doesn't help here, as it 
will rescale differently for meuse and meuse.grid, afaik.

I also wonder what, besides curiosity, the value of a 4-th or higher 
order trend surface might be.
--
Edzer

Jarek Jasiewicz wrote:
> Hi
> I found that result of formula:
>
> gs=gstat(id="x", formula=zinc~(x+y)^2, data=meuse)
> pgs=predict(gs, newdata, meuse.grid)
>
> is equvalent to:
>
>
> gs=gstat(id="x", formula=zinc~x+y, data=meuse, degree=2)
> pgs=predict(gs, newdata, meuse.grid)
>
>
> so I tried:
> gs=gstat(id="x", formula=zinc~(x+y)^4, data=meuse)
> pgs=predict(gs, newdata, meuse.grid)
>
> and it worked!
>
> so it is possible to calculate trend over 3th polynominal (now its not 
> a metter for what :))) in that way?
>
> regards
> Jarek
>
>
>
> _______________________________________________
> statsgrass mailing list
> statsgrass at grass.itc.it
> http://grass.itc.it/mailman/listinfo/statsgrass




More information about the grass-stats mailing list