[R-sig-Geo] GSTAT ordinary kriging prediction with large observation

Edzer Pebesma edzer.pebesma at uni-muenster.de
Fri Feb 28 21:25:41 CET 2014



On 02/28/2014 08:29 PM, Moshood Agba Bakare wrote:
> Dear All,
> 
> The R script below is to generate interpolation grid for prediction using
> ordinary kriging. I encountered error message " R  encountered a fatal
> error, the session was terminated". This is as a result of large obervation
> I have 116,818.  I have no problem in fitting my variogram model with this
> large observation using GSTAT but encountered error  message above during
> interpolation using ordinary kriging.When I used few observations, the
> script ran successfully. Please advise me on how to rectify this problem.
> Does it mean we can use the entire observations for prediction?
> 

Possibly, we'd need more information to be sure. You can set nmax = 100
(or any other value) to constrain the number of nearest observation used
for prediction.

> 
> This is my script
> 
> ### Create grid for the interpolation (prediction) through ordinary kriging
> 
> easting.range <- as.integer(range(canmod.sp at coords[,1]))
> northing.range <-as.integer(range(canmod.sp at coords[,2]))
> 
> ## now expand to a grid with 100 meter spacing:
> grd <- expand.grid(x=seq(from=easting.range[1], to=easting.range[2],
> by=100),
>                    y=seq(from=northing.range[1], to=northing.range[2],
> by=100))
> names(grd)<-c("easting","northing")
> 
> coordinates(grd)<-~easting+northing
> proj4string(grd)<-CRS("+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84
> +units=m +no_defs +towgs84=0,0,0")
> Pred_ok <- krige(id="yield",yield ~ 1, canmod.sp, newdata = grd,
> model=exp.mod)
> 
> 
> Thanks while looking forward to reading your response please.
> 
> Moshood
> 

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Heisenbergstraße 2, 48149 Münster, Germany. Phone: +49 251
83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAC227795

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140228/bf87a5be/attachment.bin>


More information about the R-sig-Geo mailing list