
Edzer,

The procedure I have been using with e.g. binomial variables is explained in:

https://stat.ethz.ch/pipermail/r-sig-geo/2008-April/003433.html

and then in section 4.3.3 of my lecture notes (that I have been self-citing too much ;) ).

I agree --- it is not statistically optimal because I do not really do a GLS estimate of the GLM coefficients. But to justify this I often like to refer to the paper of Minasny and McBratney (http://dx.doi.org/10.1016/j.geoderma.2007.04.028), who do show that such RK-approach is robust and gives approximately the same results as the most sophisticated technique (as long as the sample is representative, not too clustered and large enough): "REML-EBLUP is useful when the trend is strong, and the number of observations is small (< 200). We concluded that improvement in the prediction of soil properties does not rely on more sophisticated statistical methods, but rather on gathering more useful and higher quality data." 

Going back to the original Dave's question (see also https://stat.ethz.ch/pipermail/r-sig-geo/2008-February/003173.html), I really think that there is still much work in front of us to define and then implement models that combine sophisticated fitting of the deterministic part of variation (regression trees, NNs, GAMs, GLMs) with geostatistics. As Paolo nicely noted in https://stat.ethz.ch/pipermail/r-sig-geo/2008-February/003176.html: "there is scope to play around with other alternatives like the GLMM or maybe MCMCpack, but this is certainly not ready
"out-of-the-box" and code will need to be adapted for spatial purposes." 

I am looking forward to testing the same procedure in geoR(glm) next week.

Tom



-----Original Message-----
From: Edzer Pebesma [mailto:edzer.pebesma@uni-muenster.de]
Sent: Fri 7/4/2008 11:19 AM
To: Frede Aakmann Tøgersen
Cc: Hengl, T.; r-sig-geo@stat.math.ethz.ch; Dave Depew; paulojus@ufpr.br
Subject: Re: SV: [R-sig-Geo] kriging
 
I completely agree with you that this seems the more coherent 
statistical modelling approach to these kind of problems. At the time we 
did the analysis on /Fulmaris glacialis/, which was 2003, the 
corresponding approach was already offered by package geoRglm (using 
MCMC; it extends geoR with glm-type models) but seemed computationally 
too demanding for samples of that size (a few hundred observations, two 
years).

Tom, is this approach mentioned in one of your teaching guides?
--
Edzer

Frede Aakmann Tøgersen wrote:
> Sorry for dropping in late in this thread, which I have not followed closely. 
>  
> Perhaps Paulo Ribeiro can correct me but thinking of geostatistics in terms of statistical models then I think that the book by Diggle & Ribeiro:
>  
> http://www.springer.com/geosciences/computer+&+mathematical+applications/book/978-0-387-32907-9
>  
> would give some regular methods to do what some call regression kriging (and related methods) based on statistical models. I know this requires some distributional assumptions, but there are straight forward methods for Gaussian data as well as data with more general distribution as in "generalized linear models". Also moderate departure from the assumption of Gaussian data do not have that big effect on inferences in such models. The above reference is supporting the geoR package in R.
>  
> Med venlig hilsen / Regards
>
> Frede Aakmann Tøgersen
> Forsker / Scientist
>
>
>  	
>  	 AARHUS UNIVERSITET / UNIVERSITY OF AARHUS	
> Det Jordbrugsvidenskabelige Fakultet / Faculty of Agricultural Sciences	
> Inst. for Genetik og Bioteknologi / Dept. of Genetics and Biotechnology	
> Blichers Allé 20, P.O. BOX 50	
> DK-8830 Tjele	
>  	
> Tel:	 +45 8999 1900	
> Direct:	 +45 8999 1878	
> Mobile:	 +45 	
> E-mail:	 FredeA.Togersen@agrsci.dk <mailto:FredeA.Togersen@agrsci.dk> 	
> Web:	 www.agrsci.dk <https://djfpost.agrsci.dk/exchweb/bin/redir.asp?URL=http://www.agrsci.dk/> 	
> ________________________________
>
> DJF udbyder nye uddannelser <https://djfpost.agrsci.dk/exchweb/bin/redir.asp?URL=http://www.agrsci.dk/ny_navigation/uddannelse/>  / DJF now offers new degree programmes <https://djfpost.agrsci.dk/exchweb/bin/redir.asp?URL=http://www.agrsci.org/content/view/full/34133> . 
>
> Tilmeld dig DJF's nyhedsbrev / Subscribe Faculty of Agricultural Sciences Newsletter <https://djfpost.agrsci.dk/exchweb/bin/redir.asp?URL=http://www.agrsci.dk/user/register?lan=dan-DK> . 
>
> Denne email kan indeholde fortrolig information. Enhver brug eller offentliggørelse af denne email uden skriftlig tilladelse fra DJF er ikke tilladt. Hvis De ikke er den tiltænkte adressat, bedes De venligst straks underrette DJF samt slette emailen.
>
> This email may contain information that is confidential. Any use or publication of this email without written permission from Faculty of Agricultural Sciences is not allowed. If you are not the intended recipient, please notify Faculty of Agricultural Sciences immediately and delete this email.
>
>  
>
> ________________________________
>
> Fra: r-sig-geo-bounces@stat.math.ethz.ch på vegne af Edzer Pebesma
> Sendt: to 03-07-2008 13:33
> Til: Hengl, T.
> Cc: r-sig-geo@stat.math.ethz.ch; Dave Depew
> Emne: Re: [R-sig-Geo] kriging
>
>
>
> Hengl, T. wrote:
>   
>> I agree with Paulo - gstat can work with any linear model including the transforms of the original predictors e.g.:
>>
>> Z ~ X + X^2 + Y + Y^2    etc.
>>
>> The problem is that gstat implements the so-called Kriging-with-external-trend algorithm to make predictions (see section 2.1 of my lecture notes), which is mathematically more elegant, but then it accepts only a family of linear models (and not GLMs, regreesion-trees etc.). I have been promoting the concept of regression-kriging (deterministic and stochastic predictions seperated), but we still did not implement it in any package so far.
>>  
>>     
> And I can see why, as there are quite a few problems still to solve
> (afaik) ahead of you. When you cut the problem in two, do the regression
> estimation and residual prediction in two separate processes (often
> under different assumptions, e.g. wrt spatial correlation) you ignore
> the correlation between the two. Finding a prediction variance by
> naively adding the variances of the two components e.g. does not yield
> zero variance at observation locations, because a non-zero correlation
> is ignored. At other locations, this correlation is also non-zero.
> Furthermore, if you cut the problem in two for e.g. binomial or Poisson
> distributed cases, in this approach you likely end up with negative
> predictions or predictions above one for the binomial case.
>
> Does the paper you refer to (by yourself) give solutions to these two
> problems?
>   
>> You can at any time separate the predictions (e.g. krige only the residuals), but then gstat will not give you the regression-kriging variance, and you can not run geostatistical simulations.
>>  
>>     
> No, of course not, for the reasons mentioned above. The gstat approach
> is: if you want to make a mess, please take responsibility for it by
> yourself (and don't blame me--through the package). There is a paper I
> did it with count data, though, which is
>
> E.J. Pebesma, R.N.M. Duin, P.A. Burrough, 2005. Mapping Sea Bird
> Densities over the North Sea: Spatially Aggregated Estimates and
> Temporal Changes. Environmetrics 16
> <http://www3.interscience.wiley.com/cgi-bin/jissue/110577560>, (6), p
> 573-587 <http://dx.doi.org/10.1002/env.723>.
>
> and (part of) the analysis is found in
>
> library(gstat)
> demo(fulmar)
>
> I'm also confused by this term "regression kriging". Would you claim
> that the universal kriging/kriging with (one or more) external drifts
> implemented by gstat is not regression kriging? Are you actually working
> on a package that does do regression kriging as you define it?
> --
> Edzer
>
>   
>> see also:
>> https://stat.ethz.ch/pipermail/r-sig-geo/2008-February/003174.html
>>
>>
>> All the best,
>>
>> Tom Hengl
>> http://spatial-analyst.net <http://spatial-analyst.net/> 
>>
>> Hengl, T., 2007. A Practical Guide to Geostatistical Mapping of
>> Environmental Variables. EUR 22904 EN Scientific and Technical Research
>> series, Office for Official Publications of the European Communities,
>> Luxemburg, 143 pp.
>> http://bookshop.europa.eu/uri?target=EUB:NOTICE:LBNA22904:EN:HTML
>>
>>
>> -----Original Message-----
>> From: r-sig-geo-bounces@stat.math.ethz.ch on behalf of Dave Depew
>> Sent: Mon 6/16/2008 10:54 PM
>> To: Paulo Justiniano Ribeiro Jr
>> Cc: r-sig-geo@stat.math.ethz.ch
>> Subject: Re: [R-sig-Geo] kriging
>>
>> Ok,
>> What about higher order polynomials? I have fitted one using a gam to
>> the data which which helps to normalize the residuals, and reduce the
>> variance of the residuals.
>> Is it simply a matter of plugging in the function into the gstat command
>> line? Or is it simpler to krig the residuals and then add the trend back
>> to the interpolated residual grid?
>>
>>
>> Paulo Justiniano Ribeiro Jr wrote:
>>  
>>     
>>> Dave,
>>>
>>> what is necessary for UK is a relation expressed by a linear model, not
>>> necessaraly a linear relation between the variables.
>>> e.g. you could have a second degree polinomial and still work within the
>>> scope of universal kriging.
>>>
>>>
>>> On Mon, 16 Jun 2008, Dave Depew wrote:
>>>
>>>  
>>>    
>>>       
>>>> Hi all,
>>>> I have a data set that I would like to krige to interpolate between
>>>> transects. There is a non-linear trend between two of the variables...my
>>>> impression from reading the gstat help file is that there must be a
>>>> linear relationship between the data to use universal kriging?
>>>> Second, would a method of non-linear regression followed by modelling of
>>>> the residuals with a semivariogram be an appropriate solution?
>>>>
>>>> Thanks,
>>>>
>>>> Dave
>>>>
>>>> _______________________________________________
>>>> R-sig-Geo mailing list
>>>> R-sig-Geo@stat.math.ethz.ch
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>>
>>>>    
>>>>      
>>>>         
>>> Paulo Justiniano Ribeiro Jr
>>> LEG (Laboratorio de Estatistica e Geoinformacao)
>>> Universidade Federal do Parana
>>> Caixa Postal 19.081
>>> CEP 81.531-990
>>> Curitiba, PR  -  Brasil
>>> Tel: (+55) 41 3361 3573
>>> Fax: (+55) 41 3361 3141
>>> e-mail: paulojus AT  ufpr  br
>>> http://www.leg.ufpr.br/~paulojus
>>>
>>>
>>>
>>>
>>>    
>>>       
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo@stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>>
>>
>>       [[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
>>  
>>     
>
> --
> Edzer Pebesma
> Institute for Geoinformatics (IfGI)
> University of Münster
> http://ifgi.uni-muenster.de/
>
>
>         [[alternative HTML version deleted]]
>
>
>
>   

-- 
Edzer Pebesma
Institute for Geoinformatics (IfGI)
University of Münster
http://ifgi.uni-muenster.de/






	[[alternative HTML version deleted]]


