I agree with Paul that kriging might be a better option, but if you want
to use IDW, the intamap package includes a function for optimizing the
power based on cross-validation. In the example for the function
interpolate, replace the penultimate line with:
x = interpolate(meuse, meuse.grid, list(mean=TRUE), methodName = "idw")
to see how it works.
Tweaking the power to get a smooth surface is not necessarily the best
choice, unless you know how smooth the surface should be.
Cheers,
Jon
Paul Hiemstra wrote:
Hi Erik,
IDW does not include a formal interpretation of the inverse distance
power. You could seperate your dataset into a validation and
interpolation set and try different idp's and see which one preforms
best.
Another option would be to use kriging. Kriging fits the spatial
dependence vs distance to the data. In my view this makes kriging, as
long as the assumptions are honored, a preferable approach. The
automap package provides easy acces to kriging by providing some
wrapper code around gstat.
cheers,
Paul
On 08/30/2010 06:31 PM, Mudrak, Erika [EEOBS] wrote:
I used the gstat package to interpolate measurements of eight
environmental variables in a square 15.4 m x 15.4 m, and then I used
model selection from another package to build models of dependence of
plant population locations on those environmental variables. I used
the idw() function to interpolate the environmental variables. The
model selection procedure defined which of the eight variables helped
to explain the patterns seen in my plant populations.
Are there any guidelines for the choice of the inverse distance
weighting power (idp)? I had been using idp=2, because it was the
default, but for some variables it made the surface look not very
smooth. I have tried my models on surfaces with other values of
idp, and changing this parameter causes the model selection procedure
to arrive at different models.
Does anyone have any advice or guidelines about the choice of the ipd
parameter, other than "tweaking" it until the surfaces look smooth?
Thank you,
Erika Mudrak
[[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
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo