I am attempting to run some interpolations using kriging on transformed data using the transformation log (x + 1) - because my non-negative data has many zero values. The problem I have is with back-transforming the kriging estimates back to the original scale.
I am already aware of this related question Backtransformation of kriging predictions and variances but the accepted answer does not produce satisfactory results for my data.
Here's what I am doing (the data can be downloaded from : https://www.dropbox.com/sh/xnwp3zz5abnilyo/AABRVJZ0kTmWk0T9Fcp4-bVSa?dl=0/)
library(gstat)
library(sp)
library(automap)
library(rgdal)
hs1<- readOGR (".", "Hollicombe_S1_L1-5_A1.2")
#There are some negative values for the PerArIn metric which must be wrong
#for now let's assume these are 0
# replaces any negative values with 0 and remove duplicate loactions
hs1$PerArIn[hs1$PerArIn < 0] <- 0;
hs1 <- hs1[which(!duplicated(hs1@coords)), ]
#Perform autoKrige with transformed PerArIn data
PerIn.krg <- autoKrige(log1p(PerArIn)~1, hs1)
So now I want to back-transform the krige_output
for PerIn.krg
and this is where my issue is.
In the answer to the question referenced above the recommended procedure is to use the correction of Laurent (1963), as follows:
#estimate back to original scale following Laurent (1963)
PerIn.krg$krige_output$var1.pred <- exp(PerIn.krg$krige_output$var1.pred +0.5 *
(PerIn.krg$krige_output$var1.var))
PerIn.krg$krige_output$var1.var <- exp(2*PerIn.krg$krige_output$var1.pred + PerIn.krg$krige_output$var1.var)*
(exp(PerIn.krg$krige_output$var1.var)-1)
But this back-transformation shows predictions well above 100 - the data is percentage data so the original scale does not extend beyond 100!
For example:
> print(PerIn.krg$krige_output$var1.pred)
...
[297] 236.275600 231.036118 223.001912 212.319480 199.312973 184.456154
...
So I tried just using exp() as follows:
PerIn.krg$krige_output$var1.pred <- exp(PerIn.krg$krige_output$var1.pred)
PerIn.krg$krige_output$var1.var <- exp(PerIn.krg$krige_output$var1.var)
Which results in more realistic predictions, but still with some values over 100:
> print(PerIn.krg$krige_output$var1.pred)
[497] 97.465657 100.742912 103.146009 104.504026 104.671525 103.543346
Are there any insights or suggested alternative methods (either for different transformations or back-transformation procedures)?
logit
which will be between [-Inf, Inf] and is gaussian.