Ordinary and Regression Kriging combined to deal with missing values in predictor variables
Paul, calling for gurus is easy, but why don't you try to elaborate on the problems that you claim this approach has without telling Eelke what they are? -- Edzer
Paul Hiemstra wrote:
Hi Eelke, I would advise against filling up the RK grid with OK predictions. Interpolating the predictors would have my preference, although it has it own set of problems. What is the opinion of the r-sig-geo gurus on this subject? cheers, Paul Eelke Folmer wrote:
Hello all,
I'm using Gstat/R for regression kriging. I don't have values for all
locations in the predictor variables for which I want to interpolate
a surface. I do however want to make use of the independent
predictors. Therfor I combined regression kriging with ordinary kriging:
1. regression kriging: krige(log(cer+1) ~ pred1 + pred2 , data,
data.pred.grid, model = vgm.fit1) 2. ordinary kriging:
krige(log(cer+1) ~ 1, data, pred.grid,
model = vgm.fit0) 3. add the values from the second step to the grid
where the first step gives NA: s0 = surface.krige0 at data$var1.pred
s1 = surface.krige1 at data$var1.pred
s1[is.na(s1)] <- 0 # make the NA zero
s0[!is.na(s1)] <- 0 # make everyting that is not NA in s1 zero
s1 = s1 + s0 # now, all locations get a predicted value
despite missing predictors
surface.krige at data$var1.pred.inclusive = s1
Is this ok, or should I interpolate (in fact, extrapolate) the
predictors to get values at all necessary locations instead? Better
solutions available?
Thank you in advance for time and effort.
Best regards,
Eelke
Eelke Folmer
Animal Ecology Group
University of Groningen
P. O. Box 14
9750 AA Haren
The Netherlands
+31(0)50 3632091
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo