得到与"iterMax"有关的错误"spatstat :: density"功能. [英] getting error `spatstat::density` function related to "iterMax"
问题描述
R中density
函数的错误提示:时间迭代次数超过iterMax;增加dtt或增加iterMax"
Help with error "No of time iterations exceeds iterMax; increase dtt or increase iterMax" for density
function in R
如何增加iterMax?
How do I increase the iterMax?
我正在使用库spatstat.
I am using the library spatstat.
这是我的脚本:
d660<-密度(unmark(control23_network.ppp),660)
d660 <- density(unmark(control23_network.ppp), 660)
我在线性网络上的Point模式具有:
My Point pattern on linear network has:
1969点 具有20126顶点和21363线的线性网络 封闭窗口:矩形= [-87.63141,-87.55547] x [41.75817,41.83858]单位
1969 points Linear network with 20126 vertices and 21363 lines Enclosing window: rectangle = [-87.63141, -87.55547] x [41.75817, 41.83858] units
在spatstat库中具有示例数据集的示例如下:
An example of it working is in the spatstat library with sample dataset:
数据(芝加哥)
芝加哥
d60<-密度(unmark(芝加哥),60)
d60 <- density(unmark(chicago), 60)
图(d60)
d60
此样本数据集具有:
线性网络上的点模式 116点 多种类型,可能的类型:袭击,入室盗窃,盗窃,损坏,抢劫,盗窃,侵入 具有338个顶点和503条线的线性网络 封闭窗口:矩形= [0.3894,1281.9863] x [153.1035,1276.5602]英尺
Point pattern on linear network 116 points Multitype, with possible types: assault, burglary, cartheft, damage, robbery, theft, trespass Linear network with 338 vertices and 503 lines Enclosing window: rectangle = [0.3894, 1281.9863] x [153.1035, 1276.5602] feet
推荐答案
这是关于spatstat::density.lpp
的问题,spatstat::density.lpp
是线性网络上点模式(类lpp
)的density
方法.
This is a question about spatstat::density.lpp
, the method for density
for point patterns on a linear network (class lpp
).
所选带宽sigma
太大.包围的矩形大约为0.1个单位宽,而带宽为sigma=660
个单位.这将需要大量重复的算法,因此它拒绝了.
The chosen bandwidth sigma
is far too large. The enclosing rectangle is about 0.1 units wide, while the bandwidth is sigma=660
units. This would require a prohibitively large number of iterations of the algorithm, so it refuses.
在此示例中,带宽sigma
的合理值应在0.001到0.05个单位之间.
A reasonable value of bandwidth sigma
in this example would be between 0.001 and 0.05 units.
这篇关于得到与"iterMax"有关的错误"spatstat :: density"功能.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!