spatstat - mppm 和 Geyer-Hardcore 混合交互的两个问题
问题描述
我正在尝试将混合交互模型拟合到一组点模式,我想对其进行进一步处理和检查,但我遇到了两个不同的(?)问题:
首先,我尝试让 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
返回一个错误:
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
使用混合交互过程的任何建议。
非常感谢!
解决方案
这些是错误。
它们现在都已修复(我们相信)在spatstat 1.63-3.004
github 存储库中提供的最新开发版本 ( ) 中。
推荐阅读
- r - Rayrender 只渲染黑色图像
- php - PHP 上 SAP HANA UTF8 的最后一个字符问题
- ruby-on-rails - Ruby on Rails 助手“distance_of_time_in_words”显示随机值
- drupal - 如何使用 PhpStorm 直接在服务器上工作?
- sql - 谁能告诉我为什么我的表字段引用不适用于此触发器查询?
- javascript - 得到一个包含 2 个对象的数组。每个对象都有一个属性“事件”,其中包含一个对象数组。如何过滤participantId不为1的元素?
- python - 返回文件名,但通配符已解析
- python - Python 列表到嵌套的 Json
- flutter - 颤振未处理的异常:SocketException:操作系统错误:连接被拒绝,errno = 111
- gradle - 如何解决:Android Gradle 插件仅支持 Kotlin Gradle 插件版本 1.3.10 及更高版本。?