>When trying Edzer suggestions, on doing UK with gstat, I found some
>As this were general, I decided to post this message for the list because
>other people may encoutered similar situations.
>I could not manage to make UK with a covariate work...
>vgm1 <- variogram(log(zinc)~elev, ~x+y, meuse)
>plot(vgm1, model=m)#(this worked fine)
># However when doing krige, it does not worked. I tried with dif. data
>sets,.... and always similar.
>x <- krige(log(zinc)~c(elev), ~x+y, model = m, data = meuse, newd =
>#Error in eval(expr, envir, enclos) : Object "elev" not found
>x <- krige(log(zinc)~meuse$elev, ~x+y, model = m, data = meuse, newd =
>#Error in predict.gstat(g, newdata = newdata, block = block, nsim =
>nsim, : dimensions do not match: locations 6206, nrows in X 155
>Maybe the covariate for the kriging should be the predictions for all the
>borded area (similar to geoR)????
#So for example, if I additionally do (just playing not seriously....):
vgm2 <- variogram(elev~1, ~x+y, meuse)
plot(vgm2, model=m2)#(this worked fine)
k.elev <- krige(elev~1, ~x+y, model = m2, data = meuse, newd = meuse.grid)
#### So we have a prediction of the covariate for each location within the grid
## And after:
x <- krige(log(zinc)~k.elev$var1.pred, ~x+y, model = m, data = meuse, newd
>I just tried it and it does not work as well....
>What am I doing wrong?
>Thank you in advance for any help,
>All the best
[Non-text portions of this message have been removed]