Hi All, Following Edzer's examples, I have tried to test the effects of the specification of alpha in variogram on the results of fit.variogram as below:
> v = variogram(zinc~1,meuse) > v0 = variogram(zinc~1,meuse, alpha = 0, tol.hor = 45) > v90 = variogram(zinc~1,meuse, alpha = 90, tol.hor = 45) > v090 = variogram(zinc~1,meuse, alpha=c(0, 90), tol.hor=45) > v45135 = variogram(zinc~1,meuse, alpha=c(45, 135), tol.hor=45) > v2 = variogram(zinc~1,meuse, alpha=c(0, 45, 90, 135), tol.hor=45) > fit.variogram(v, vgm(1, "Exp", 300, anis=c(90,1))) model psill range 1 Exp 166238 323.6674 > fit.variogram(v, vgm(1, "Exp", 300, anis=c(90,.1))) model psill range ang1 anis1 1 Exp 166238 3236.674 90 0.1 > fit.variogram(v090, vgm(1, "Exp", 300, anis=c(90,.1))) model psill range ang1 anis1 1 Exp 166262.4 3237.814 90 0.1 > fit.variogram(v45135, vgm(1, "Exp", 300, anis=c(90,.1))) model psill range ang1 anis1 1 Exp 165919.4 3224.622 90 0.1 > fit.variogram(v2, vgm(1, "Exp", 300, anis=c(90,.1))) model psill range ang1 anis1 1 Exp 166091 3231.219 90 0.1 > fit.variogram(v0, vgm(1, "Exp", 300, anis=c(90,.1))) model psill range ang1 anis1 1 Exp 146068.7 2772.751 90 0.1 > fit.variogram(v90, vgm(1, "Exp", 300, anis=c(90,.1))) model psill range ang1 anis1 1 Exp 200767.2 4027.282 90 0.1 Above results show that using v, v090, v45135 and v2 would produce similar results for anis=c(90, 0.1), suggesting that the specification of alpha in variogram is largely redundant, while using v0 and v90 produced very different results, suggesting a contrary. Could anyone shed a light on this? Thanks. Jin -----Original Message----- From: r-sig-geo-boun...@r-project.org [mailto:r-sig-geo-boun...@r-project.org] On Behalf Of Edzer Pebesma Sent: Tuesday, 19 July 2011 5:59 PM To: shweta jp Cc: r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] anisotropy modeling The description says: The automatic fitting is done through fit.variogram. estimateAnisotropy {intamap} does fit anistropy coefficients. On 07/18/2011 08:27 PM, shweta jp wrote: > Is the same true for autofitVariogram {automap} ? > > Shweta > > On Wed, Jul 13, 2011 at 1:13 PM, Edzer Pebesma < > edzer.pebe...@uni-muenster.de> wrote: > >> help(fit.variogram) has the following description: >> >> Fit ranges and/or sills from a simple or nested variogram model to >> a sample variogram >> >> I suspected it would completely ignore anisotropy settings. However, >> this seems not to be the case: >> >>> library(gstat) >> Loading required package: sp >> Loading required package: spacetime >> Loading required package: zoo >> Loading required package: xts >>> loadMeuse() >>> v0 = variogram(zinc~1,meuse, alpha = 0, tol.hor = 45) >>> v90 = variogram(zinc~1,meuse, alpha = 90, tol.hor = 45) >>> v = variogram(zinc~1,meuse) >>> fit.variogram(v, vgm(1, "Exp", 300, anis=c(90,1))) >> model psill range >> 1 Exp 166238 323.6674 >>> fit.variogram(v, vgm(1, "Exp", 300, anis=c(90,.1))) >> model psill range ang1 anis1 >> 1 Exp 166238 3236.674 90 0.1 >>> fit.variogram(v0, vgm(1, "Exp", 300, anis=c(90,.1))) >> model psill range ang1 anis1 >> 1 Exp 146068.7 2772.751 90 0.1 >>> fit.variogram(v90, vgm(1, "Exp", 300, anis=c(90,.1))) >> model psill range ang1 anis1 >> 1 Exp 200767.2 4027.282 90 0.1 >>> >> >> >> On 07/13/2011 11:34 AM, Matevž Pavlič wrote: >>> Hi, >>> >>> thanks for the reply. Can you explain this a little bit more : >>> " it assumes the variogram to fit to is in the major (correlation) >> direction (or averaged over all directions)." >>> >>> I don't know exactly ehat it means.... >>> m >>> >>> -----Original Message----- >>> From: r-sig-geo-boun...@r-project.org [mailto: >> r-sig-geo-boun...@r-project.org] On Behalf Of Edzer Pebesma >>> Sent: Wednesday, July 13, 2011 10:10 AM >>> To: r-sig-geo@r-project.org >>> Subject: Re: [R-sig-Geo] anisotropy modeling >>> >>> >>> >>> On 07/12/2011 10:52 PM, Matevž Pavlič wrote: >>>> Hi all, >>>> >>>> >>>> >>>> i 'm am not entirely sure I understand anisotropy kriging in R. >>>> >>>> I have a data set in which is (at least i think so) anisotropy is >> clearly visible. So I made directional variograms.... >>>> >>>> So as i understand, the only thing that is different from >normal< >> kriging is the >anis< property in which you define the diffrenece of >> ranges? Is that coreect? >>> >>> Yes. Please note that fit.variogram ignores anything about anisotropy, it >> assumes the variogram to fit to is in the major (correlation) direction (or >> averaged over all directions). >>> >>>> >>>> Bellow is the code i use : >>>> >>>> >>>> >>>> a<-5000/7000 >>>> >>>> print(plot(variogram(Z ~ 1, DF, map = TRUE, cutoff = 15000, width = >>>> 100), main = "Variogram map, podlaga",col.regions = >>>> terrain.colors(64))) >>>> >>>> v1.a<-variogram(Z~1, DF, alpha=c(45, 135)) >>>> >>>> (vmf.a <- fit.variogram(v1.a, vgm(2900, "Pen", 5500, 300, anis = >>>> c(135, a)))) >>>> >>>> print(plot(v1.a, pl = F, pch = 20, col = "blue")) >>>> >>>> print(plot(v1.a, plot.numbers = F, pch = 20, col = "darkblue", model = >>>> vmf.a)) >>>> >>>> >>>> >>>> podlaga.aniso<-krige(Z~1, DF[-zerodist(DF)[,1],], grd, vmf.a ) >>>> >>>> print(spplot(podlaga.aniso, zcol="var1.pred", >>>> col.regions=terrain.colors(64), contour=T, pretty=T, cuts=15, >>>> key.space="right")) >>>> >>>> print(spplot(podlaga.aniso, zcol="var1.var", >>>> col.regions=terrain.colors(64), contour=T, pretty=T, cuts=15, >>>> key.space="right")) >>>> >>>> writeGDAL(podlaga.aniso, "podlaga_aniso.tif") >>>> >>>> >>>> >>>> thanks for info, >>>> >>>> >>>> >>>> m >>>> >>>> >>>> [[alternative HTML version deleted]] >>>> >>>> _______________________________________________ >>>> R-sig-Geo mailing list >>>> R-sig-Geo@r-project.org >>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo >>> >>> -- >>> Edzer Pebesma >>> Institute for Geoinformatics (ifgi), University of Münster Weseler Straße >> 253, 48151 Münster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 >> http://ifgi.uni-muenster.de >>> http://www.52north.org/geostatistics e.pebe...@wwu.de >>> >>> _______________________________________________ >>> R-sig-Geo mailing list >>> R-sig-Geo@r-project.org >>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo >> >> -- >> Edzer Pebesma >> Institute for Geoinformatics (ifgi), University of Münster >> Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251 >> 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de >> http://www.52north.org/geostatistics e.pebe...@wwu.de >> >> _______________________________________________ >> R-sig-Geo mailing list >> R-sig-Geo@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo >> > -- Edzer Pebesma Institute for Geoinformatics (ifgi), University of Münster Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebe...@wwu.de _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo