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, lis
Hi Klaus,
When I try
plot_poly = rtopObj3$observations
plot_poly$predictions = rtopObj3$predictions$var1.pred
spplot(plot_poly, c("observations", "predictions"))
it does not work since the replacement has 2100 rows and the data has
100.
I would like to create a new object (e.g. plot_poly) wh
Hi Seba,
Your impression was unfortunately right, in the current version of the
package on CRAN it is not possible for the anisotropy detection method
to take trends into account. Although the trend and the anisotropy
parameters should ideally be estimated jointly, I think it would be a
decen
Hi Greg,
Variogram modelling is slower with large data sets, but 8-10.000
observations should not be a problem, unless you need the results
extremely fast. On my computer (3 years old) it takes about 4 seconds
with 8.000 random observations, using the variogram function in gstat.
Time increas
Hi Tom,
it is great that you like the intamap-packages!
The optimization function could not use auxiliary predictors properly in
the version you tested, but there is now a new version on CRAN (it might
take some time before it is distributed) where it is possible to do what
you ask for.
Plea
Hi Friederike,
For which variable do you have NAs? If soil moisture is sm, you are
missing in the first line:
[!is.na(soildmD79.sp$smoist.20.06.2005),]
If that is not the problem, it would be helpful if you sent a
reproducible example.
Cheers,
Jon
friederike.gerschla...@agrar.uni-giessen.d
Hi,
This is not possible in the version on CRAN now, but has been changed in
the development version that you can find on one of the links below
(depending on platform), should be on CRAN soon.
http://www.intamap.org/downloads/intamap_1.3-1.zip
http://www.intamap.org/downloads/intamap_1.3-1.ta
Hi Els,
I think you want to do:
idw.pred.zn <- idw(zinc ~ 1, meuse.pred, meuse.val)
and for kriging cross-validation:
krige.pred.zn <- krige(zinc ~ 1, meuse.pred, meuse.val,model =
vgm(14,"Sph",600,0.1))
krige.pred.zn$res = krige.pred.zn$var1.pred - meuse.val$zinc
krige.pred.zn$zscore = k
Hi,
I think Mathieu wanted to know how to create formula strings from
variable names. The function "as.formula" should be able to do what he
is looking for.
as.formula(paste(names(meuse)[4],"~",names(meuse)[6]) )
is an alternative way of calling a function with the formula zinc~dist,
knowing