[R-sig-Geo] Discontinuities in KED prediction with `nmax` set

Edzer Pebesma edzer.pebesma at uni-muenster.de
Sun Jun 10 20:05:55 CEST 2012



On 06/10/2012 12:32 PM, Piero Campalani wrote:
> Dear list,
> 
> I have a set of ~130 ground stations measurements and several grid
> covariates with which I am spatialising the ground point values.
> I am using external drift kriging: I noticed discontinuities in the
> predicted map when using a _localized_ prediction, hence restricting the
> neighbors count with the *nmax* parameter in the gstat function.
> 
> I am a bit surprised since I guessed that localising the prediction
> wouldn't change that much the final map: the more distant the ground
> point, the smaller the kriging weight associated with it.

That is true for its weight wrt predicting the residual process, but not
necessarily for estimating the local mean parameters.

> I attach a screenshot to visually understand the situation: on the left
> side is the KED prediction, on the right side the localized (nearest 50
> points) KED prediction.
> I don't know if these evident discontinuities are a normal consequence
> of localized models, or if I am doing something wrong.

I'd say the former.

> 
> This is an example of what I did, using the meuse dataset:
> ___________________________
> library(gstat)
> library(sp)
> data(meuse)
> data(meuse.grid)
> coordinates(meuse) <- ~x+y
> coordinates(meuse.grid) <- ~x+y
> 
> cvgm <- variogram(zinc~dist, data=meuse, width=100, cutoff=1000)
> fitted <- fit.variogram(cvgm, vgm(psill=1, model="Exp", range=100,
> nugget=1))
> KED_fit <- gstat(id="KED_fit", formula=zinc~dist, data=meuse, model=fitted)
> KED10_fit <- gstat(id="KED10_fit", formula=zinc~dist, data=meuse,
> model=fitted, nmax=10)
> 
> KED_pred <- predict.gstat(KED_fit, meuse.grid)
> KED10_pred <- predict.gstat(KED10_fit, meuse.grid)
> 
> KED_pred$KED10_fit.pred <- KED10_pred$KED10_fit.pred
> gridded(KED_pred) <- TRUE
> spplot(KED_pred, zcol=c("KED_fit.pred", "KED10_fit.pred"),
> col.regions=colorRampPalette(brewer.pal(7, "BuPu")[-(1:1)])(21))
> ___________________________
> 
> Thanks for any clarification in advance.
> 
> 
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list