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@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.pebe...@wwu.de
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo