I'm looking into kriging the Meuse dataset in R. I first performed ordinary kriging using copper, using krige.cv to calculate residuals. The distribution of prediction variances given by applying krige to my grid and krige.cv was approximately the same. However, when I try doing cokriging, the cross validation prediction variances are 60-75% smaller than before, whilst the prediction variances given by "predict" are roughly the same as with ordinary kriging. Is there a reason to explain this - you can see the cokriging code below.
library(sp)
library(gstat)
data(meuse)
meuselog<-meuse
meuselog["logcadmium"]<-log1p(meuselog$cadmium)
meuselog["logcopper"]<-log(meuselog$copper)
coordinates(meuselog) = ~x+y
proj4string(meuselog)<-CRS("+init=epsg:28992")
data(meuse.grid)
coordinates(meuse.grid) = ~x+y
proj4string(meuse.grid)<-CRS("+init=epsg:28992")
gridded(meuse.grid)=TRUE
lcu.vgm <- variogram(logcopper~1, meuselog)
lcu.fit <- fit.variogram(lcu.vgm, model = vgm(0.5,"Sph",900,0.1))
#Cokriging - copper and cadmium
coppercd<- gstat(NULL, id = "logcopper", form = logcopper ~ 1, data=meuselog)
coppercd<- gstat(coppercd, id = "logcadmium", form = logcadmium ~ 1, data=meuselog)
coppercd.cross<-variogram(coppercd)
plot(coppercd.cross)
# Add variogram models to the gstat object and fit them using LMC
coppercd<-gstat(coppercd, id = "logcopper", model = lcu.fit, fill.all=T)
coppercd<-fit.lmc(coppercd.cross,coppercd)
coppercd.ck <- predict(coppercd, meuse.grid)
set.seed(1234)
coppercd.cv <- gstat.cv(coppercd,nfold=10)
summary(coppercd.ck)
summary(coppercd.cv)
coppercd.ck
are the predictions and variances for copper and cadmium over the meuse grid, butcoppercd.cv
has the cross-validation prediction, variance, and residual/Z for doing CV at the 155 locations. Do you expect those Z scores to relate to the prediction errors over the meuse grid?