[R-sig-Geo] Getting regression coefficients when universal kriging

Edzer Pebesma edzer.pebesma at uni-muenster.de
Tue May 27 11:10:35 CEST 2014


Look at ?predict.gstat and search for the BLUE parameter.

In principle, with BLUE = TRUE, prediction is based only on the (BLUE,
GLS) regression coefficients, ignoring residual. To get the regression
parameters, you have to provide fake predictors, e.g. a vector c(0,1)
will, in case of two coeffiecients return you the second parameter as
predicted value, along with its SE.

hth,

On 05/27/2014 10:50 AM, Steinbuch, Luc wrote:
> Suppose I have this  (working) code:
> 
> library(gstat) 
> library(rgdal) 
> library(raster) 
> 
> data(meuse) 
> coordinates(meuse) = ~x+y 
> r <- raster(system.file("external/test.grd", package="raster")) 
> projection(r)<-projection(meuse) 
> names(r) = 'elev' 
> 
> vu<-variogram(log(zinc)~elev,meuse) 
> mu<-fit.variogram(vu,vgm(1,"Sph",300,1)) 
> gUK<-gstat(NULL,"log.zinc",log(zinc)~elev,meuse,model=mu) 
> UK<-interpolate(r, gUK, xyOnly=FALSE)
> 
> How do I find the finally used regression parameters, calculated by the universal kriging function of 'interpolate'?
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Heisenbergstraße 2, 48149 Münster, Germany. Phone: +49 251
83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAC227795

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140527/7e58515e/attachment.bin>


More information about the R-sig-Geo mailing list