[R-sig-Geo] Note on variogram fitting with polynomial degree
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Tue Sep 17 12:27:22 CEST 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
degree is not listed as a parameter in ?variogram, and is ignored,
regrettably silently, but this is how R often works when there's a ...
in the argument list.
The function that accepts degree is ?gstat, and I tried:
variogram(gstat(NULL, "lzinc", log(zinc)~1, meuse, degree=2))
and that gives a nice error message that degree is not supported by
variogram().
I understand this is somewhat confusing. Do you think we should modify
the book or the documentation of some function?
On 09/17/2013 11:36 AM, Caspar Hallmann wrote:
> Dear all,
>
> I read in ASDAR: "Residual variograms are calculated by default
> when a more complex model for the trend is used..."
>
> However, I noticed that when using fit.variogram in gstat with an
> additional option: degree=2, but keeping the formula as an
> intercept only, does not account for the higher degree of
> complexity in the model. I suspect this is not the intended
> behavior. To honour a dependence structure (polyn degree) in my
> observations I need to state the dependence explicitly in the
> formula.
>
> Best regards,
>
> Caspar
>
> data(meuse) coordinates(meuse) <- c("x", "y")
> v<-variogram(log(zinc)~1,meuse) print(v)
> vs<-variogram(log(zinc)~1,meuse,degree=2) print(vs)
> vt<-variogram(log(zinc)~x*y+I(x^2)+I(y^2),meuse) print(vt)
>
> PS: x86_64-w64-mingw32/x64 (64-bit) R version 3.0.1 (2013-05-16)
> gstat_1.0-16
>
> _______________________________________________ R-sig-Geo mailing
> list R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
- --
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Heisenbergstraße 2, 48149 Münster, Germany. Phone: +49 251
83 33081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSOC6KAAoJEM1OCHCtOnfx6dkH/iIluvBI83ghDMoNIb+/rTDz
LOtVwu8oZp90vGIAVltBbqPVIu4SZH4jj6jif0HrEJU3wshE4k51EkGwq77jvP13
+pnCrwApeBHpJ2iUgYgqYCJAkwj+F25HxX1IxjcmQVIe8LC6O3fl/Rr8WAdnqbAL
M3J8nzEf23yWba683BCBxQwDBHbaTSHYlrKjAbEyQWsnVY40lBV0Vl7SdooseyWK
jPdEFPhp3kQIpPKhbmoAo9PwocwfUympZZ0KbM3xosZrI2cfI1dXXzrOwJtsCBrW
7/pK9fOxDYfGZICEnSr3xkf3FQCaoFQZY5uVEIrOo67/GkNxt5ewBkIdsQCi+vc=
=m5bR
-----END PGP SIGNATURE-----
More information about the R-sig-Geo
mailing list