I'm trying to work out a way to calculate anisotropy
ratios in a simple case with the direction of the
greatest and smallest continuity at right angles to
each other. I thought that I would do this by
minimizing the standard error of the variogram as in
the following:

library(sp)
data(meuse)
coordinates(meuse) =~ x+y
meuse = meuse["zinc"]
meuse$zinc = log(meuse$zinc)
data(meuse.grid)
gridded(meuse.grid) =~ x+y

library(automap) # available at
http://intamap.geo.uu.nl/~paul/Downloads.html

"f" <-
function(ani, z, data)
{
  [EMAIL PROTECTED], 2] <- [EMAIL PROTECTED], 2] * ani
  variogram = autofitVariogram(z, data)
  attr(variogram$var_model, "SSErr")
}

ani <- optimize(f, c(0, 100), maximum = FALSE, tol =
1, z = log(zinc)~1, data = meuse)
meuseA <- meuse
[EMAIL PROTECTED], 2] <- [EMAIL PROTECTED], 2] * ani$minimum
kriging_resultA <- autoKrige(meuse, meuse.grid,
meuseA)
plot(kriging_resultA) 

# without anisotropy
kriging_result = autoKrige(meuse, meuse.grid)
plot(kriging_result)

However, minimizing the standard error doesn't seem to
be the right thing to do, as the larger I make the
ratio, the smaller the standard error. Is there
another measure I should be using?? 

Lisbeth,

PS. Sorry, the meuse data set isn't the best example
as it doesn't fit my assumption about anisotropy ratio
at right angles, but everyone has access to it.

Lisbeth R.i.i.s.
S-c-a-r-a-b  C-o-n-s-u-l-t




      
____________________________________________________________________________________
Luggage? GPS? Comic books?

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to