[英]Kriging simulation using ff package
I'm trying to understand the way I can use the ff package to overcome the error 我试图了解我可以使用ff包克服错误的方式
"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: 我正在使用gstat包执行仿真,如下所示:
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. 您可以通过设置
nmax=50
来执行此操作,因此将50个最接近的观察(或模拟)值用作条件数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.