使用ff包进行Kriging模拟 [英] Kriging simulation using ff package
本文介绍了使用ff包进行Kriging模拟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图了解使用ff包克服错误的方式
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?
我正在使用gstat软件包执行以下模拟:
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)
推荐答案
对于高斯模拟,您需要将邻域大小设置为某个值,否则内存消耗将无限增加.您可以执行此操作,例如通过设置nmax=50
,因此将50个最近的观察(或模拟)值用作条件数据.
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.
这篇关于使用ff包进行Kriging模拟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文