Converting point process model intensity predictions to probabilities at specific points spatstat

∥☆過路亽.° 提交于 2020-01-25 10:12:25

问题


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

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

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.

Any help is greatly appreciated!


回答1:


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.



来源:https://stackoverflow.com/questions/58696016/converting-point-process-model-intensity-predictions-to-probabilities-at-specifi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!