[R-sig-Geo] Ordinary and Regression Kriging combined to deal with missing values in predictor variables

Paul Hiemstra p.hiemstra at geo.uu.nl
Mon May 26 10:47:36 CEST 2008


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
>   


-- 
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone: 	+31302535773
Fax:	+31302531145
http://intamap.geo.uu.nl/~paul




More information about the R-sig-Geo mailing list