Getting regression coefficients when universal kriging
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>