Hi rubenfcasal,
Thanks a lot for your response.  having fitted spherical, Gaussian, and
exponential model, I had already used krige.cv to determine which of the
three functions gave highest prediction accuracy. I have four different set
of data from the same field Being irregularly space data, the spatial
coordinate (latitude, longitude) of a data point varies from one dataset to
the other.
Since I intend to assess the stability of the spatial structure across the
four datasets, I created a regular interpolation grid of size 10 m x 10 m.
I used the script

orkrig <- krige(yield ~ 1, canmod.sp, newdata = grid, model=exp.mod,nmax=20)
to generate interpolated value  for each grid node using ordinary kriging
approach. Likewise, I considered inverse distance weighting as another
interpolation method. I got interpolated values of each grid node using the
two methods. My question is how do I know which of the two methods give the
more accurate prediction or interpolation value. I used krige.cv in this
case but no success. As you rightly pointed out, we cross validate models
and not ordinary kriging or IDW interpolation methods.

The problem I noticed is that in each grid node, we have interpolated or
predicted value without the true value. It is difficult to assess the two
methods based on prediction error.

Any other approach or suggestions is welcome
Thank you.
Moshood






On Sat, May 24, 2014 at 4:20 PM, rubenfcasal <rubenfcasal@gmail.com> wrote:

>  Hi Moshood,
>
>     I think your approach is wrong.
>
>     Cross-validation is a way to diagnose if your fitted model/procedure
> is correct (you cross-validate the model, not the predictions). You can use
> cross-validation to estimate the prediction error. The prediction error is
> the expected error when you use the model/method to predict the response on
> a new observation, one that was not used in estimating/fitting the model.
> It has not to be confused with the observed error (nor with other estimate
> that you can compute).
>
>     The idea behind CV is to repeatedly delete some of the data (one
> observation in leave-one-out cross-validation, the standard procedure) and
> use the remaining data to predict the deleted observations. Then the
> prediction error can be estimated from the differences between predictions
> and true values.
>
>     You can use krige.cv() for CV a kriging model. I think you will have
> to write the appropriate code (calling idw() repeatedly)  for inverse
> distance weighting.
>
> Best regards,
>     Ruben Fernandez-Casal
>
>
> El 21/05/2014 21:15, Moshood Agba Bakare escribió:
>
> Hi all,
>
> I have been having a couple of challenge with my analysis. I have
> irregularly space spatial yield monitor data over four years. Pooling this
> data together is not feasible because of misalignment. That is, the
> coordinates of data point varies from one year to the other.
> I  created a common regular interpolation grid for each year with the same
> grid size of 10 x 10 m. I am able to get interpolated value for each point
> using ordinary kriging and inverse distance weighting method (IDW). Please
> how I cross validate this two interpolation methods to know which one give
> me the best estimate.
>
> The problem I notice is that there is no observe value in each
> interpolation point to assess the prediction accuracy of these methods.
> Please what do I do? see my script below. I correlated the interpolated
> values from the two methods. They are highly correlated (r=0.98). How do I
> know which  method gave good prediction?
>
> 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 to create kriging prediction
> orkrig <- krige(yield ~ 1, canmod.sp, newdata = grid, model=exp.mod,nmax=20)
>
>
>
> ## Inverse Distance Weighting (IDW) Interpolation method maxdist=16.5
> idw1 = idw(yield~1, canmod.sp, newdata=grid,nmax=20,idp=1)
>
> Thanks while looking forward to reading from you.
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing listR-sig-Geo@r-project.orghttps://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
>

	[[alternative HTML version deleted]]

