将点过程模型强度预测转换为特定点的概率spatstat [英] Converting point process model intensity predictions to probabilities at specific points spatstat

查看:87
本文介绍了将点过程模型强度预测转换为特定点的概率spatstat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究与spatstat软件包中的chorley数据集相似的数据集,并且正在按照样本书一章空间点模式:R的方法和应用"中进行的相似分析进行分析.

I am working on a similar dataset as the chorley dataset in the spatstat package and am following a similar analysis as presented in the sample book chapter, Spatial Point Patterns: Methodology and Applications with R. https://book.spatstat.org/sample-chapters/chapter09.pdf

library(spatstat)
data("chorley")
X <- split(chorley)$larynx
D <- split(chorley)$lung
Q <- quadscheme.logi(X,D)
fit <- ppm(Q ~ x + y)
locations = data.frame(x=chorley$x, y=chorley$y)
pred <- predict(fit, locations = locations,  type="intensity")

summary(pred)
 Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
0.09059 0.15562 0.17855 0.18452 0.20199 0.33201

data.ppm(fit)
Planar point pattern: 58 points
window: polygonal boundary
enclosing rectangle: [343.45, 366.45] x [410.41, 431.79] km

Q
Quadrature scheme (logistic)
58 data points, 978 dummy points
     Total weight 315.1553

我想知道为什么在模型上运行data.ppm时,似乎只在模型中包含了肯定的情况?

I was wondering why when running the data.ppm on the model, it only seems that the positive cases were included in the model?

还有一条警告消息,警告消息: vcov未针对虚拟类型给定"实现-使用两个我都不知道如何解释的数据集(乔利和我自己的数据集)附带的泊松公式".

There is also a warning message, "Warning message: vcov is not implemented for dummy type ‘given’ - using ‘poisson’ formula" that comes up with both datasets (chorley and my own) that I do not know how to interpret.

任何帮助将不胜感激!

推荐答案

我们正在对空间风险进行建模.您在笛卡尔坐标中的对数线性风险是奇数,但我想这只是一个例子.因此,我们通常认为拟合模型的强度实际上是相对风险.因此,预测强度"确实可以为我们提供给定位置的预测风险(个案的几率).要隐蔽相对风险,可以做到的(从原始代码的中间开始):

We are modelling the spatial risk. Your log-linear risk in the Cartesian coordinates is odd, but I guess it is just an example. So what we usually think of as the intensity of the fitted model is really the relative risk. So predicting the "intensity" really gives us the predicted risk (odds of case) at the given location. To covert the relative risk to a probability you can do (continuing from the middle of the original code):

rr <- predict(fit, locations=unmark(chorley))
p <- rr/(1+rr)

警告与估计器的方差协方差矩阵的估计有关.它有点技术性,但是从本质上讲,该方法假设您使用的是随机生成的虚拟点(在本例中为肺癌病例),并且它需要知道哪个点过程模型生成了这些点.由于您直接提供了这些信息,因此仅假设它们是由泊松点过程生成的.如果您的数据中包含合理数量的控件,那么我不会对此部分感到担心.

The warning is related to the estimate of the variance covariance matrix of the estimator. It is somewhat technical, but in essence the methodology assumes you are using randomly generated dummy points (lung cancer cases in this example), and it needs to know which point process model generated these points. Since you supplied these directly it is just assuming they were generated from a Poisson point process. I wouldn't be too worried about this part if you have a reasonable number of controls in your data.

这篇关于将点过程模型强度预测转换为特定点的概率spatstat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆