Loading ...
Sorry, an error occurred while loading the content.

Re: AI-GEOSTATS: gstat in R doubts

Expand Messages
  • Edzer J. Pebesma
    (I added gstat-info to the addressees, as I believe this message and possibly further discussion better belong there) -- Edzer ... If your variable is called
    Message 1 of 2 , Nov 28 6:18 AM
    • 0 Attachment
      (I added gstat-info to the addressees, as I believe this message and
      possibly further discussion better belong there)

      Marta Rufino wrote:

      > Dear Collegues,
      > I have some particular doubts about gstat for R (most probabily very
      > basic for what I apoligise):
      > 1. Does it compute indicator kriging? How to define it? It should be
      > I=.5, but where? I could not find the argument in 'variogram'

      If your variable is called z, and cutoff is .5, define the formula for
      the data as:
      I(z < .5) ~ 1

      > 2. I could not manage to make it do the backtransformation of the
      > kriging predictions when using log data. Is it possible and how?

      You can take the exponent to get a median-like estimator, for
      the expected value you will need to use the kriging variance as
      well. See any book on lognormal kriging. The lagrange parameter
      is not available.

      > 3. How exactly we specify universal kriging? I have found different
      > ways in different places:
      > kk=krige(abu~x+y, ~x+y, dat, bl, model=wls) # I think this one
      > indicates a quadractic internal trend :-)
      > or
      > kk=krige(abu~(covariate), ~x+y, dat, bl, model=wls)
      > or
      > kk=krige(abu~x+y+(covariate), ~x+y, dat, bl, model=wls)

      These are indeed three forms of universal kriging (although some people
      call the second "external drift" kriging -- but how then would they call
      the third? Universal external drift kriging?).

      BTW abu~x+y indicates a first order linear trend in x and y, use
      for a second order linear trend (is that what you meant by quadratic trend?)

      > And the variogram of the residuals for the universal kriging... how do
      > we do it? the same way?

      Yes: variogram(abu~x+y, ~x+y, dat)

      > 4. The function plot.variogram as the same name as in geoR. This
      > causes bugs and problems runing it, and does not allow us to run both
      > packages which would be important. Could this be solved by any of the
      > authors, simply by renaming the function... probabily there are more
      > like this, although I did not proceed because I got stuck.
      > (To solve this the only way I found is to attach and detach the
      > packages, ...)

      Paulo and I are aware of this; we'll solve it, at some stage.

      > 5. The variogram produced by both packages (gstat and geoR) are
      > different. Why?

      Because Paulo Ribeiro and I are different persons. gstat is much older
      than geoR,
      but gstat in R is much younger. I copied the "old" gstat variogram
      properties to the
      gstat in R variogram object. I was in a hurry and didn't look too much
      around. I can
      regret this, but it's too late. I agree that they should have different
      names. Give me
      a good suggestion!

      > It was excelent and extremely usefull for me the implementation of
      > gstat in R!!! Thank you so much!


      * 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
    Your message has been successfully submitted and would be delivered to recipients shortly.