Hi Zev,
There's no need to brute force, as optimize is there to help you -- my
guess is that the function is convex. The following takes a while:
> f = function(idp, formula, data,...)
sum(krige.cv(formula,data,set=list(debug=0,idp=idp),...)$residual**2)
> optimize(f, interval=c(0.01,4), for
Hi All,
Thanks to Paul and Alessandro for their suggestions. Paul's code (brute
force) worked well for me and the results match up well with ArcGIS.
I'm not using a large dataset so the speed isn't an issue but with a
larger dataset it would be. In ArcGIS the optimization is instantaneous
so c
Hi
Normally I use the R+SAGA to calculate the IDW and create a raster, with
this follow code. I change the radius input with a loop formula to create
several raster and after check the best result (I am studying a oak forest
with low density)
radii.list <- as.list(c(5, 10, 15, 20, 25, 30))
for