Dear list(en)ers,
I wonder what the "dist" is, which is in the output of predict.gstat()
with debug.level=16. I expect it to be the distance between the
coordinate pair given in the same line and the prediction location. I
verified this for the coordinates and distances given for "data id: 0"
in the below example (and its true), but for "data id: 1" it's always
"dist: 0". Is there a way to get the distances for the second covariate?
I see it's simple in the example, because data are colocated, but the
problem arose in a case with non-colocated covariates.
Here's the example:
library(gstat)
data(meuse)
coordinates(meuse) <- ~x+y
variog <- variogram(zinc~1, meuse)
varmod <- fit.variogram(variog, vgm(150000, "Exp", 1000))
data(meuse.grid)
coordinates(meuse.grid) <- ~x+y
g <- gstat(NULL, "z", zinc~1, meuse, model=varmod, nmax=10)
g <- gstat(g, "dist", I(dist*1000)~1, meuse, nmax=10)
variog.g <- variogram(g)
g <- fit.lmc(variog.g, g, vgm(100000, "Exp", 500, 1000))
meuse.point <- meuse.grid[sample(1:nrow(meuse.grid), 1),]
predict(g, newdata=meuse.point, debug.level=16)
Thanks!
Tom
--
Technische Universität München
Department für Pflanzenwissenschaften
Lehrstuhl für Grünlandlehre
Alte Akademie 12
85350 Freising / Germany
Phone: ++49 (0)8161 715324
Fax: ++49 (0)8161 713243
email: [email protected]
http://www.wzw.tum.de/gruenland
_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo