rcross-validationautomap

how to do cross-validation for block kriging?


I have written a code in automap package to cross-validate different kriging techniques. I have cross-validated all of them, but I cannot write the code for Block kriging. It shows this error:

unused argument (block=c(400,400))

library(automap)
mydata<-read.table(".../mydata.txt",header=T,sep=",")
colnames(mydata)=c("x","y","data1")
library(gstat)
coordinates(mydata)=~x+y
mygrids<-read.table(".../grids.txt",header=T,sep=",")
gridded(mygrids)=~x+y
block_kriging_cv<-autoKrige.cv(log(data1)~x+y, mydata, mygrids, block=c(400,400), model=c("Ste"), nfold=10)

Now, please let me know how I can fix it. The final step after fixing this will be compare.cv of all cv s, am I right?


Solution

  • This means that the autoKrige.cv command does not take in account the blocks of your data. It performs the cross-validation point-by-point and not by blocks.

    Cross validation takes in account the accuracy of the estimates of the interpolation (or prediction) for POINTS while block kriging is a smoothing method that divides the whole area into several BLOCKS and calculate the local average of your estimations for each of those area. In other words, for the area 'block' you don't have a 'value' to compare your estimation made by kriging