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 = [EMAIL PROTECTED]
  s1 = [EMAIL PROTECTED]
  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
[EMAIL PROTECTED] = 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
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to