mppm 和 Geyer-Hardcore 混合交互的两个问题
Two issues with mppm and Geyer-Hardcore hybrid interaction
我正在尝试将混合交互模型拟合到一组点模式,我想进一步处理和检查这些点模式,但我 运行 分为两个不同的 (?) 问题:
首先,我尝试让 mppm 为我选择 Hardcore 截止距离:
data("demohyper")
res1 <- mppm(Points ~ 1, interaction = Hybrid(Geyer(r=.1, sat=3), Hardcore(NA)), data=demohyper)
...但我收到以下错误:
Error in crosspaircounts(U, X, r) :
is.numeric(r) && length(r) == 1 is not TRUE
相反,我手动确定了 Hardcore 距离,并将模型安装在 Hyperframe 上:
# find minimum hardcore distance in data set
res1 <- lapply(demohyper$Points, FUN = function(x) ppm(x~1, interaction = Hybrid(Geyer(r=.1, sat=3), Hardcore(NA))) )
minhc <- min(sapply(res1, FUN = function(x) { x$interaction$par$HybridComponent2$par$hc }))
minhc # .01166023
# fit mppm model with hc < minhc
res3 <- mppm(Points ~ 1, interaction = Hybrid(Geyer(r=.1, sat=3), Hardcore(.01)), data=demohyper)
sub <- subfits(res3, verbose=T)
...但是这次,subfits
returns 一个错误:
Extracting stuff...done.
Determining active interactions...done.
Computing implied coefficients...Interaction, done.
Fisher information...Error in check.nvector(w, nrow(x), things = "rows of x") :
The length of ‘w’ (=4257) should equal the number of rows of x (=4229)
In addition: Warning message:
In split.default(values, id) :
data length is not a multiple of split variable
有谁知道这是否是预期行为,与我选择的参数有关?否则,对于如何让 subfits
使用混合交互过程的任何建议,我将不胜感激。
非常感谢!
这些是错误。
它们现在都已修复(我们相信)在 github 存储库中可用的最新开发版本 (spatstat 1.63-3.004
) 中。
我正在尝试将混合交互模型拟合到一组点模式,我想进一步处理和检查这些点模式,但我 运行 分为两个不同的 (?) 问题:
首先,我尝试让 mppm 为我选择 Hardcore 截止距离:
data("demohyper")
res1 <- mppm(Points ~ 1, interaction = Hybrid(Geyer(r=.1, sat=3), Hardcore(NA)), data=demohyper)
...但我收到以下错误:
Error in crosspaircounts(U, X, r) :
is.numeric(r) && length(r) == 1 is not TRUE
相反,我手动确定了 Hardcore 距离,并将模型安装在 Hyperframe 上:
# find minimum hardcore distance in data set
res1 <- lapply(demohyper$Points, FUN = function(x) ppm(x~1, interaction = Hybrid(Geyer(r=.1, sat=3), Hardcore(NA))) )
minhc <- min(sapply(res1, FUN = function(x) { x$interaction$par$HybridComponent2$par$hc }))
minhc # .01166023
# fit mppm model with hc < minhc
res3 <- mppm(Points ~ 1, interaction = Hybrid(Geyer(r=.1, sat=3), Hardcore(.01)), data=demohyper)
sub <- subfits(res3, verbose=T)
...但是这次,subfits
returns 一个错误:
Extracting stuff...done.
Determining active interactions...done.
Computing implied coefficients...Interaction, done.
Fisher information...Error in check.nvector(w, nrow(x), things = "rows of x") :
The length of ‘w’ (=4257) should equal the number of rows of x (=4229)
In addition: Warning message:
In split.default(values, id) :
data length is not a multiple of split variable
有谁知道这是否是预期行为,与我选择的参数有关?否则,对于如何让 subfits
使用混合交互过程的任何建议,我将不胜感激。
非常感谢!
这些是错误。
它们现在都已修复(我们相信)在 github 存储库中可用的最新开发版本 (spatstat 1.63-3.004
) 中。