[GRASS-stats] using LOESS on spatial data

Jarek Jasiewicz jarekj at amu.edu.pl
Fri Jan 18 15:26:29 EST 2008


Hi all!

first of all - all works and results are as I expeted.
I rather like to consult your opinion about method I used to implement 
LOESS (Local Polynomial Regression Fitting) to analize spatial data in R

I prepared testing population of random point and sampled 
spGridDataFrame (with overlay from sp package), next tried to fit local 
polinominal to points and predict it on grid
I tried it on the spPointDataFrame:
ls=loess(height~coords,data=points,span=0.3), and of course it faliled

Next step was with to repit it with ordinary data frame:
data.frame(points)
ls=loess(height~(x+y), span=0.3)

and predicted it on oridnary data frame:

grid=data.fame(sp_grid)
names(grid)=c("f","x","y")
result=predict(ls,grid)
and I've substituted: (result is numeric vector)
sp_grid$f=result
all is OK, values are as can expected and spatially corected

So I have three question:
-first: Is there any information about using R fo fit LOESS to spatial 
data (I didn't found nothing abot it)
-second is posible and how process this with spatialgrid and spatial 
points datasets (I suppose it will  be faster)
-3th: is the procedure proper?

regards
Jarek



More information about the grass-stats mailing list