Kriging simulation using ff package

空扰寡人 提交于 2020-01-06 04:57:26

问题


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)

回答1:


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



来源:https://stackoverflow.com/questions/48520861/kriging-simulation-using-ff-package

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!