简体   繁体   中英

Kriging simulation using ff package

I'm trying to understand the way I can use the ff package to overcome the error

"Error: cannot allocate vector of size 1.1 Mb"

while using kriging/ gaussian simulation. I don't know how to change the input data. Is there any idea to help me do that?

I'm using the gstat package to perform the simulation as follows:

library(sp)
data(meuse)
coordinates(meuse) = ~x+y
data(meuse.grid)
gridded(meuse.grid) = ~x+y
m <- vgm(.59, "Sph", 874, .04)
# ordinary kriging:
x <- krige(log(zinc)~1, meuse, meuse.grid, model = m, nsim=1000)

For Gaussian simulation you need to set the neighbourhood size to some value, otherwise the memory consumption grows unlimited. You can do this eg by setting nmax=50 , so the 50 nearest observed (or simulated) values are used as conditioning data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM