Dear,
Regarding the block kriging, the answer is in the '
kriging' function documentation.
You should use the arguments
calcul="block" and
ndisc=N like in the following example.
The 'kriging' function also returns for each target:
- the variance of the block estimation when flag.varz=TRUE and
- the variance of the block estimation error (aka kriging error) when flag.std=TRUE (stdev²)
- Code: Select all
data = db.create(x1=runif(10),x2=runif(10),z1=rnorm(10))
grid = db.create(nx=c(10,10),dx=c(0.1,0.1))
model = model.create(vartype="Spherical",range=0.3)
neigh = neigh.create(type=2, nmaxi=3, radius=2)
grid2 = kriging(data, grid, model, neigh, calcul="block", ndisc=4, flag.varz=TRUE, flag.std=TRUE)
plot(grid2, name = "z3")
For Lagrange parameters, it's a little bit more tricky.
You should call the '
krigtest' function for each target.
You will find the Lagrange parameter in the 'zam' vector returned by this function.
Indeed, the Lagrange parameter is the first 'Drift coefficient' which corresponds to the Universality condition.
- Code: Select all
lagrange = c()
for(iech in seq(1, grid$nech)) {
res = krigtest(data, grid, model, neigh, calcul="block", ndisc=4, iech0=iech)
lagrange = c(lagrange, res$zam[res$nech+1])
}
grid2 = db.add(grid2, lagrange, loctype="z")
plot(grid2)
Hope this helps
Best regards