[R-sig-Geo] RE : Inverse Distance Weighting and Treating kriged data before cross validation

Tobin Cara cara.tobin at epfl.ch
Fri Jan 15 15:26:28 CET 2010


Hello Prof. Pebesma,

I would like to use leave-one-out cross validation to have a fair comparison with my other methods. 

Could you explain further how to copy krige.cv to my own function and modify? Can I open up the krige.cv code somewhere? I am still new to R.

Thank you in advance,

Cara
________________________________________
De : Edzer Pebesma [edzer.pebesma at uni-muenster.de]
Date d'envoi : vendredi, 15. janvier 2010 12:14
À : Tobin Cara
Cc : r-sig-geo at stat.math.ethz.ch
Objet : Re: [R-sig-Geo] Inverse Distance Weighting and Treating kriged data before cross validation

Dear Cara,

one way would be to copy krige.cv to your own function and modify this;
I would recommend this if you want leave-one-out cross validation.

If n-fold cross validation is good enough for a few folds, e.g. because
you have plenty of data, then I would do the whole procedure "manually",
using predict, krige or idw on the points of a particular fold using the
data from the remaining folds.
--
Edzer


Tobin Cara wrote:
> Hello,
>
> I am using inverse distance weighting with gstat for temperature just to compare it with other kriging methods. For a temperature field, I have removed the elevation effect at the stations by normalizing all stations to the lowest with a lapse rate of -6.5 deg C /1000 m.
>
> Now, I want to krig the normalized data and then add back the lapse rate multiplied by the difference in elevation to get the real temperatures at all real elevations. However, how can I do this before cross validation?
>
> I only know cross validation with the following command where it does not allow manipulation of the kriged field before cross validation:
>
> crossval_idw <- krige.cv(Temp93hr~1, DataCoordhr)
>
> Thank you in advance for your help.
>
> Cheers,
>
> Cara
>
>       [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de


More information about the R-sig-Geo mailing list