[R-sig-Geo] how to fit 3d variogram in gstat
maogui.hu
maogui.hu at gmail.com
Mon Nov 28 10:18:56 CET 2016
Dear list,
gstat has a powerful function in 2d and spatial-temporal variogram fitting. I'm wondering how can i fit a 3d automatically? Here is a simple snippet to create a 3d dataset:
library(sp)
library(gstat)
data(DE_RB_2005, package = "gstat")
st <- as.data.frame(DE_RB_2005[,1:100])
st <- st[,c(1,2,6,16)]
names(st) <- c("x", "y", "z", "v")
st$x <- (st$x - mean(st$x)) / sd(st$x) * 100
st$y <- (st$y - mean(st$y)) / sd(st$y) * 100
st$z <- (st$z - mean(st$z)) / sd(st$z) * 100
coordinates(st) <- ~x+y+z
v <- variogram(v~1, st)
print(v)
Thanks very much!
Maogui Hu, Ph.D.
State Key Laboratory of Resources and Environmental Information System
Institute of Geographic Sciences and Natural Resources Research, CAS
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list