0

I have a set of measurements for a variable Z over a non uniform grid in X and Y. For each Z value I have a mean plus a variance of the measurement. That is, I have a data set (Zmean_i,Zvariance_i,X_i,Y_i) i=1..N. In other words, some estimates of the variable Z are more reliable than others, and that uncertainty is quantified in Zvariance. If I only take into account the mean Z value the process for predicting the Z values on a new data Grid (GridXY) is clear (SP is the spatial data frame with X and Y as coordinates and Zmean as values)

v <- autofitVariogram(Zmean~X+Y,SP) Zpredicted <- krige(Zmean~X+Y,SP,GridXY,model=v$var_model)

When using the gstat package, How would I take into account the variance of each Z value (Zvariance) both in fitting the variogram model and also in making predicitions?

1 Answers1

0

The autofitVariogram does not have the argument to include measurement error. The best solution is to write the kriging equations in R by yourself.

Alternatively, you can use the DiceKriging R package which has the argument to include measurement error. See the argument noisy.var in the km function. You could also look at the krige0 function and modify its internal structure by adding manually the measurement error to the diagonal of the covariance matrix.

For the theory, see the paper of Delhomme (1978) or the Geostatistics book of Chiles and Delfiner.