[STATSGRASS] Re: [GRASSLIST:10737] krigging result looks weird

Roger Bivand Roger.Bivand at nhh.no
Tue Mar 7 17:33:18 EST 2006


On Tue, 7 Mar 2006, Carlos "Guâno" Grohmann wrote:

> OK I did understant what you wan tme to do and why, but I didn't get how...
> BTW I overlaid the vector points and the krigged map in GRASS and yes,
> the artifacs position match the points position

Something like:

coords <- coordinates(srtm)
jcoords <- cbind(jitter(coords[,1]), jitter(coords[,2]))

should be enough. As I understand ?jitter, it will take each coordinate 
and add runif(n, -a, a), where n is the number of points and a by default 
is factor=1 * d/5, and d is the smallest difference between coordinate 
values, so a=18 for d=90. If this is too strong, you can adjust factor= or 
amount= in the calls to jitter.

This moves the point within the flat 90m cell close to its centre, but 
avoids the distance between the data point and the prediction point 
falling to zero. If need be, you can check whether any rows of jcoords are 
equal to the same row in coords, but getting runif == 0 in both calls is 
highly unlikely.

Hope this helps.

Roger


> 
> Carlos
> 
> On 3/7/06, Roger Bivand <Roger.Bivand at nhh.no> wrote:
> > On Tue, 7 Mar 2006, Edzer J. Pebesma wrote:
> >
> > > At the risk of being too obvious/ignorant, is the issue that kriging
> > > reproduces
> > > observed values where grid cell centres exactly coincide with data points?
> > > A solution to that may be to shift the grid (or data) over a very small
> > > distance.
> >
> > No, I asked Carlos to move this here because I suspected that there might
> > be a direct explanation. Carlos, could you try jittering the input data
> > points, would just moving them within a target 30m cell be enough, say
> > within +/-15m? x+runif(*, -15, +15), y the same, and hope that both
> > runif()s don't say 0?
> >
> > Thanks!
> >
> > Roger
> >
> > > --
> > > Edzer
> > >
> >
> > --
> > Roger Bivand
> > Economic Geography Section, Department of Economics, Norwegian School of
> > Economics and Business Administration, Helleveien 30, N-5045 Bergen,
> > Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
> > e-mail: Roger.Bivand at nhh.no
> >
> >
> 
> 
> --
> +-----------------------------------------------------------+
>               Carlos Henrique Grohmann - Guano
>   Geologist M.Sc  - Doctorate Student at IGc-USP - Brazil
> Linux User #89721  - carlos dot grohmann at gmail dot com
> +-----------------------------------------------------------+
> _________________
> "Good morning, doctors. I have taken the liberty of removing Windows
> 95 from my hard drive."
> --The winning entry in a "What were HAL's first words" contest judged
> by 2001: A SPACE ODYSSEY creator Arthur C. Clarke
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no





More information about the grass-stats mailing list