AI-GEOSTATS: more gstat in R doubts: UK with covariate did not work
>Dear colegues,#So for example, if I additionally do (just playing not seriously....):
>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)????
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....[Non-text portions of this message have been removed]
>What am I doing wrong?
>Thank you in advance for any help,
>All the best
- Marta Rufino wrote:
>> Dear colegues,Martha, I now realize that you need more knowledge about how
>> When trying Edzer suggestions, on doing UK with gstat, I found some
> x <- krige(log(zinc)~k.elev$var1.pred, ~x+y, model = m, data = meuse,
> newd = meuse.grid)
>> I just tried it and it does not work as well....
>> What am I doing wrong?
formulas work in S (R, S-PLUS). The example you give just
does not make sense. Please read an introductory text about S
models, or the help pages of lm(), e.g. by
> ?lmBest regards,
* To post a message to the list, send it to ai-geostats@...
* As a general service to the users, please remember to post a summary of any useful responses to your questions.
* To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
* Support to the list is provided at http://www.ai-geostats.org