[GIS] Specifying the “idp” and the “nmax” in the krige.cv function

cross-validationinterpolationinverse-distance-weightedr

I'm performing IDW interpolation using the idw R function from the gstat package.
For the purpose of determining what combination of "idp" and "nmax" produces the lowest RMSE in leave-one-out-cross validation, how can I specify the "idp" and the "nmax" that are going to be use in the krige.cv function?

Best Answer

I've had the same problem and just found a solution: In the gstat-documentation on page 21 they use for defining idp the expression set = list(idp = 0.5). For "nmax" it's as usual:

meuse.idw_cv <- krige.cv(log(zinc)~1, meuse, nmax = 7, set = list(idp = .5))
Related Question