[R-sig-Geo] semivariogram calculation - discrepancy between gls and gstat
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Tue Jul 6 09:25:50 CEST 2010
Guido, I suspect that nlme works with models for spatial correlation and
not for spatial covariance, meaning that the variance (variog) gets
standardized - see ?corClasses in nlme. Do the variog values approach 1
for longer distances?
On 07/05/2010 11:02 PM, Guido Lorenz wrote:
> Dear R-sig-Geo members,
>
> a semivariogram for spatial soil data, calculated by the gls (nlme library) function gives the following estimates:
>
>> lmm.dap2b <- gls(Dap.sa ~ 1 + ID.sitio, Pd2006mm, correlation=corGaus(form=~(easting.m+northing.m)|ID.sitio, nugget=TRUE, metric="euclidean"), na.action=na.omit, method="REML")
>> Variogram(lmm.dap2b)
> variog dist n.pairs
> 1 0.3059585 2.828427 122
> 2 0.4040062 4.269282 125
> 3 0.5744688 18.110770 123
> 4 0.5266091 20.000000 125
> ....
>
> whereas the variogram function of the gstat library gives, for similar distances (although different number of sample pairs), very different gamma values:
>
> > variogram(Dap.sa ~ 1, locations = ~ easting.m + northing.m, data=Pd2006mm, cutoff=80)
> np dist gamma dir.hor dir.ver id
> 1 219 3.225693 0.005578128 0 0 var1
> 2 20 6.478671 0.004254656 0 0 var1
> 3 3 13.513045 0.009896324 0 0 var1
> 4 307 19.201322 0.009708390 0 0 var1
> .....
>
> Can anyone explain what is happening?
>
> Thanks for any advice,
> Guido Lorenz
>
> Can anyone explain
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> 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.pebesma at wwu.de
More information about the R-sig-Geo
mailing list