[STATSGRASS] Another problem with kriging (gstat)

Edzer J. Pebesma e.pebesma at geo.uu.nl
Mon Sep 11 10:06:44 EDT 2006


Jarek,

Eight of your data are collocated:

 > zerodist(rf)
     [,1] [,2]
[1,]   46   47
[2,]  136  142
[3,]  145  147
[4,]  150  152
[5,]  200  201
[6,]  213  214
[7,]  328  333
[8,]  332  334

Removing them solves the problem. Try for example:

krig=krige(cs~1, loc=rf[-zerodist(rf)[,1],], newdata=sg, model=frfit)
spplot(krig[1],col.regions=bpy.colors())

in which case you (arbitrarily) remove the first of each colocated pair.
--
Edzer

Jarek Jasiewicz wrote:
> Hi
> It is outside statgrass because of attachment
>
> here are data and what I did (only simple model, without anisotropy 
> spherical variogram etc) but I tested it on other variograms and with 
> anisotropy, distance and so on, as well
>
>
> first data:
> rf  - with two slots: l (lenght) and cs (cosine) of the feature
> sg - spatial grid dataframe on witch I try to do prediction
>
> first variogram:
>
> vr=variogram(cs~1, locations=rf)
>
> next fitting
> frfit=fit.variogram(vr, vgm(1650, "Sph", 7000, 11000))
>
> and the last kriging
> krig=krige(cs~1, loc=rf, newdata=sg, model=vrfit)
>
> after imaging
> image(krig) the artefact will be visible well
>
> by the way: I aware that that data are not well suitable for kriging
>
> regards
> Jarek Jasiewicz




More information about the grass-stats mailing list