Secondary Navigation

AI-GEOSTATS: gstat and anisotropy parameters.

Hi I have a set of two dimensional data( measured on a grid). Initial analysis strongly suggests that there is directional anisotropy, so I ve been trying to

Message 1 of 3
, Sep 4, 2003

Hi

I have a set of two dimensional data( measured on a grid). Initial
analysis strongly suggests that there is directional anisotropy, so I've
been trying to deal with this.

One way I've found is to fit the variogram model by maximum likelihood
(or REML) using geoR. geoR seems to account for anisotropy by deforming
the locations, according to the anisotropy parameters (direction of
maximum range, and the anisotropy ratio). Cross--validation suggests
that this performs well, relative to fitting various models to
isotropic sample variogram.

The thing is, I want to use gstat for kriging. The reason for this is
that I want to do block kriging. However, gstat seems to account for
anisotropy by adjusting the variogram range according to the anisotropy
parameters.

So it seems that geoR deforms the coordinates, whereas gstat
"deforms" the variogram....

The upshot of this is that, when I use gstat to do punctual kriging
using the parameters estimated in geoR, I get different results to what
I get when I use geoR for kriging. A possible alternative, is to use
geoR to predict the deformed locations, and then use gstat to do the
kriging WITHOUT specifying the anisotropy parameter. If I do this then
gstat and geoR give the same results for kriging. This suggests that
there is no difference in the algorithms used for kriging between the
two packages. This approach seems to be OK for doing punctual
kriging... However, I want to do block kriging (square blocks). The
approach I've adopted for punctual kriging seems to fall over
here. This is because I would specify the block size (in gstat) in the
deformed coordinate space, whereas I actually want the blocks to be
specified in the original geographic coordinate space. Am I making
sense?

What a mess!!! Can any one suggest an alternative, or is this all a bit
silly?

cheers

Nick

--
* To post a message to the list, send it to ai-geostats@...
* As a general service to the users, please remember to post a summary of any useful responses to your questions.
* To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
* Support to the list is provided at http://www.ai-geostats.org

Edzer J. Pebesma

Nick, thanks for sharing this with us. The good news of course is that both gstat and geoR give the same results for isotropic kriging. The trouble is that

Message 2 of 3
, Sep 5, 2003

Nick, thanks for sharing this with us. The good news of course is that both
gstat and geoR give the same results for isotropic kriging. The trouble is
that software developers like Paulo and me are mainly bothered with
developing our own thing, and not too much with compatibility to the
others, although last March we agreed to make an effort for exactly this
reason. A similar thing that came up a few years ago on ai-geostats was
the specification of the parameters for the exponential and Gaussian
variogram models -- seehttp://ai-geostats.org/Geostats_Faq/FAQ_software_conventions.htm

and we need such a page for modelling (and fitting!) anisotropy
parameters.

I did a little experiment with two generated anisotropic
random fields, x and y, R file and png images attached.
The geoR output does estimate the ratio fairly well:
a value of 0.3 for gstat corresponds to 3.333.. in geoR;
however I do not understand the psiA value; geoR docs
say:

Anisotropy angle: defined here as the azimuth angle of the direction
with greater spatial continuity, i.e. the angle between the y-axis and
the direction with the maximum range.

As a short-term answer: you can obtain block mean values
by point kriging on a fine grid, and then averaging point kriged
values within a block. It does not give you block kriging
standard errors, though.
--
Edzer

Nick Hamm wrote:

>Hi
>
>I have a set of two dimensional data( measured on a grid). Initial
>analysis strongly suggests that there is directional anisotropy, so I've
>been trying to deal with this.
>
>One way I've found is to fit the variogram model by maximum likelihood
>(or REML) using geoR. geoR seems to account for anisotropy by deforming
>the locations, according to the anisotropy parameters (direction of
>maximum range, and the anisotropy ratio). Cross--validation suggests
>that this performs well, relative to fitting various models to
>isotropic sample variogram.
>
>The thing is, I want to use gstat for kriging. The reason for this is
>that I want to do block kriging. However, gstat seems to account for
>anisotropy by adjusting the variogram range according to the anisotropy
>parameters.
>
>So it seems that geoR deforms the coordinates, whereas gstat
>"deforms" the variogram....
>
>The upshot of this is that, when I use gstat to do punctual kriging
>using the parameters estimated in geoR, I get different results to what
>I get when I use geoR for kriging. A possible alternative, is to use
>geoR to predict the deformed locations, and then use gstat to do the
>kriging WITHOUT specifying the anisotropy parameter. If I do this then
>gstat and geoR give the same results for kriging. This suggests that
>there is no difference in the algorithms used for kriging between the
>two packages. This approach seems to be OK for doing punctual
>kriging... However, I want to do block kriging (square blocks). The
>approach I've adopted for punctual kriging seems to fall over
>here. This is because I would specify the block size (in gstat) in the
>deformed coordinate space, whereas I actually want the blocks to be
>specified in the original geographic coordinate space. Am I making
>sense?
>
>What a mess!!! Can any one suggest an alternative, or is this all a bit
>silly?
>
>cheers
>
>Nick
>
>
>
>

... This doesn t seem to work..... For another data set (no anisotropy) I have defined a 5 by 5 block and discretized it on a fine grid (400 points). Using

Message 3 of 3
, Sep 11, 2003

On Fri, 5 Sep 2003, Paulo Justiniano Ribeiro Jr wrote:

> Edzer Pebesma wrote:
>
> > As a short-term answer: you can obtain block mean values
> > by point kriging on a fine grid, and then averaging point kriged
> > values within a block. It does not give you block kriging
> > standard errors, though.
> > --
>
> I think we can:
> If we generate simulations on the fine grid, for every simulation compute
> the mean at specified block (block kriging estimate) and then the variance
> of those means you will have the block kriging std. errors

This doesn't seem to work.....

For another data set (no anisotropy) I have defined a 5 by 5 block and
discretized it on a fine grid (400 points). Using gstat I use SGS to
simulate 1000 realisations of each point. for each realisation I
compute the mean of the 400 points (to give the value of the simulation
on the block). I then have 1000 simulations of the mean for the block
-- I comupte the meand and variance of these and get:

So the mean and variance from the simulations over the block seems to be
basically the same as the block kriging prediction and
variance. Using Paulo's approach the Mean looks ok, but the Variance
seems to be underestimated...... I've checked my code and it looks
ok...

Nick

--
* To post a message to the list, send it to ai-geostats@...
* As a general service to the users, please remember to post a summary of any useful responses to your questions.
* To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
* Support to the list is provided at http://www.ai-geostats.org

Your message has been successfully submitted and would be delivered to recipients shortly.