[R-sig-Geo] spplot : Computing variances of prediction with log-transformed data in R

baremma2002 baremma2002 at yahoo.fr
Wed Oct 30 15:47:13 CET 2013


Dear users,

How can I compute the variances of prediction (ordinary kriging) using
log-transformed data in R:

library(gstat)
library(sp)
data(meuse)
coordinates(meuse)=~x+y
data(meuse.grid)
gridded(meuse.grid) = ~x+y
modv <- vgm(psill=0.5, model="Sph", range=900, nug = 0)
fitv <- fit.variogram(variogram(log(zinc)~ 1,meuse),model=modv)
res <- krige(log(zinc) ~ 1, meuse, meuse.grid,model = fitv)

Suppose the observed process Z(s) is the variable "zinc". If we assume that
Y(s) = log Z(s)
is a Gaussian process where s is a space-point, we can write:

res <- krige(Y(s) ~ 1, meuse, meuse.grid,model = fitv)

Moreover, Y(s) = mean(Y) + delta(s) 

where delta(s) is intrinsically stationary with mean 0. Ordinary Kriging on
the Y-scale yields kriging coefficients lambdaY and Lagrange multiplier mY.
Then the best linear predictor of Y(s0) is

pY(s0) = lambdaY Y

and the kriging variance is

var(Y(s0) = SUM(lambdaY semivar(s0-si) + MUY

Cressie (1993) proposed this formula to compute the unbiased predictor for
variances (mean-squared prediction error,) back on the Z-scale, of Z(s0):
 
var = {exp(2mean(Y) + var(Y(s0))}{exp(var(Y(s0)) + exp(var(pY(s0))) -
2exp(cov(Y(s0),pY(s0))} ;

The last term is the covariance between the observed and the predicted data
at the space-point s0. However, suppose that this variable is observed at 10
space-points. The predicted values will be at the other points where the
values are unknown. The covariance will be equal to zero and var will be a
constant. The kriging is exact interpolator and the predicted values are
equal to the observed values at the observed points and the covariance will
be equal to zero. Is it true? How can I compute this variance in R with
back-transformed data? Thanks.

Emmanuel BARANKANIRA




--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/spplot-Computing-variances-of-prediction-with-log-transformed-data-in-R-tp7584987.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list