我很难解释relrisk分的结果.我的数据是一个包含两个标记(两种啮齿类动物AA和RE)的多点过程,我想知道它们是否在空间上被隔离.

> summary(REkm)
Marked planar point pattern:  46 points
Average intensity 0.08101444 points per square unit

*Pattern contains duplicated points*

Coordinates are given to 3 decimal places
i.e. rounded to the nearest multiple of 0.001 units

Multitype:
frequency proportion  intensity
AA        15   0.326087 0.02641775
RE        31   0.673913 0.05459669

Window: rectangle = [4, 38] x [0.3, 17] units
x 16.7 units)
Window area = 567.8 square units

PPP Intensity of each type

relkm <- relrisk(REkm)
plot(relkm, main="Relrisk default")

Relrisk(by default) The bandwidth of this relrisk estimation is automatically selection by default(bw.relrisk), but when I tried other numeric number using sigma= 0.5 or 1, the results are somehow kind of weird. sigma=o.5 or 1 How did this happened? Was it because the large proportion of blank space of my ppp?

According to chapter.14 of Spatial Point Patterns books and the previous discussion, I assume the default of relrisk will show the ratio of intensities (case divided by control, in my case: RE divided by AA), but if I set casecontrol=FALSE, I can get the spatially-varying probability of each type. Casecontrol=FalseThen why the image of type RE in the Casecontrol=False looks exactly same as the relrisk estimation by default? Or they both estimate p(RE)=λRE/ λRE+λAA for each sites?

任何帮助都将不胜感激!谢谢!

推荐答案

这是两个问题.

  1. 为什么casecontrol=FALSERE的图像看起来与relrisk的默认输出相同?

关于spatstat个函数的最终信息来源是帮助文件中的在线文档.relrisk.ppp的帮助文件提供了该函数行为的全部细节.它说概率和风险的计算是由论点relative控制的.如果为relative=FALSE(默认值),则代码计算每种类型的空间变化概率.如果relative=TRUE,则计算每种类型i的相对风险,定义为类型i的概率与类型c的概率之比,其中c是指定为控制的类型.如果你想要相对风险,那么你应该设置relative=TRUE.

  1. 与自动 Select 的带宽相比,设置sigma=0.5时获得的结果非常不同.

您的示例输出显示窗口是34乘17个单位.对于这个区域,sigma=0.5的平滑带宽非常小.想象每个数据点被半径为0.5的模糊圆所取代;会有很多空的空间.平滑过程遇到了一些数值问题,这些问题导致了令人生厌的人工制品.

您可以try sigma的不同值范围,例如从1到15,并决定哪个值产生最令人满意的结果.

relrisk(REkm, casecontrol=FALSE)表示自动带宽 Select 器bw.relriskppp Select 了更大的值sigma,可能约为10.你可以通过

b <- bw.relriskppp(REkm)
print(b)
plot(b)

"打印"命令将打印默认计算中使用的选定值sigma.plot命令将显示交叉验证标准,该标准被最大化以 Select 带宽.这使您了解自动 Select 器可接受的sigma值范围.

阅读bw.relriskppp的帮助文件,了解带宽 Select 方法的不同选项.从你的观点来看,也许一个不同的方法 Select 会给你一个更可接受的结果.

R相关问答推荐

如何提高以键ID为列的表中键查找的效率?

以R表示的gglikert地块调整总数

使用Shiny组合和显示复制和粘贴的数据

使用scale_x_continuous复制ggplot 2中的离散x轴

如何使用按钮切换轨迹?

R Sapply函数产生的值似乎与for循环方法略有不同

在GGPLATE中将突出的点放在前面

S用事件解决物质平衡问题

如何根据嵌套元素的名称高效而优雅地确定它属于哪个列表?

从圆到R中的多边形的标绘雷达图

汇总数据帧中的复制列,保持行的唯一性

基于Key->Value数据帧的基因子集相关性提取

使用R将简单的JSON解析为嵌套框架

ArrangeGrob()和类似的替代方法不接受Grob列表.在Grid.Draw,返回:glist中的错误(...):仅允许在glist";中使用Grobs;

如何在Quarto中使用美人鱼图表中的标记来加粗文本

如何使用grepl()在数据帧列表中 Select 特定字符串?

将边列表转换为路径长度列表

使用dqur在不同变量上创建具有多个条件的变量

使用一个标签共享多个组图图例符号

动态统计函数在ShinyApp内部更改