Dear All,

I used the script below to create interpolation surface using ordinary
kriging and inverse distance weighting approach.Could anyone guide me on
how to cross validate the two interpolation methods to identify the
optimal? I intend to obtain the diagnostic statistics such mse, rmse and
others through cross validation to pick the best among the interpolation
techniques.

Thank you.


## Create grid for the interpolation through ordinary kriging and idw


grid <- expand.grid(easting = seq(from = 299678, to = 301299, by=10),
                    northing=seq(from = 5737278, to = 5738129, by=10))

## convert the grid to SpatialPixel class to indicate gridded spatial data

coordinates(grid)<-~easting + northing
proj4string(grid)<-CRS("+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84
+units=m +no_defs +towgs84=0,0,0")
gridded(grid)<- TRUE


#### Ordinary kriging

prok <- krige(id="yield",yield ~ 1, canmod.sp, newdata = grid,
model=exp.mod,nmax=20,maxdist=33.0)


## Inverse Distance Weighting (IDW) Interpolation method
yield.idw = idw(yield~1, canmod.sp, grid,nmax=20,maxdist=33.0,idp=1)

	[[alternative HTML version deleted]]

