英文:
'spatstat' package: Fitting cluster process models
问题
-
在使用spatstat包拟合集群过程模型以解决我正在处理的问题时,是否有建议的最小样本量考虑,以获得可靠的模型参数估计?
-
如果已知点模式是不均匀的,并且强度随着x和y的变化而变化,是否可以在模型中将x和y作为交互项包括进去?在我的情况下,我认为修改后的Thomas模型可能是理想的。因此,以下实现是否正确?
kppm(ppdata ~ x*y, clusters="Thomas", method="palm", statistic="Kinhom")
尽管在使用这种方法时集群强度和兄弟概率会发生变化,但比例参数被估计为与下面的均匀情况相同的值。
kppm(ppdata ~ 1, clusters="Thomas", method="palm", statistic="K")
提前感谢您的回答!
英文:
I have several questions regarding fitting cluster process models using the spatstat package, to solve a problem I am working on.
-
Is there a recommended minimum sample size consideration when fitting a cluster process model to get reliable estimates for the model parameters?
-
If it is known that the point pattern is inhomogeneous and the intensity varies with x and y, is it correct to include x and y as an interaction term in the model? In my scenario I think a modified Thomas model would be ideal. So will the following be correct in implementing this?
kppm(ppdata ~ x*y, clusters ="Thomas", method = "palm", statistic = "Kinhom")
Although cluster intensity and sibling probability change in using this, the scale parameter was estimated as the same value as the homogenous case below.
kppm(ppdata ~ 1, clusters ="Thomas", method = "palm", statistic = "K")
Thanks in advance!
答案1
得分: 1
> 它是一个当前研究的主题。答案取决于聚类的强度和范围(以及“可靠”估计的定义)。大多数标准测试案例示例包含100到200个点。
> 如果已知点模式是不均匀的,并且强度随着x和y变化,将x和y作为模型中的交互项是否正确?在我的情况下,我认为修改后的Thomas模型是理想的。所以在实施这个模型时以下是否正确?
kppm(ppdata ~ x*y, clusters="Thomas", method="palm", statistic="Kinhom")
statistic="Kinhom"
参数仅在method="mincontrast"
时相关,在method="palm"
时被忽略。
在公式中,x*y
表示x + y + x:y
。当协变量x
和y
是数值时,x:y
表示xy
。因此,公式ppdata~x*y
指定强度函数采用形式lambda(x,y) = exp(a + bx + cy + dxy)
,其中a,b,c,d
是将被估计的系数。如果包含了术语xy
,您可能会考虑使用公式ppdata~polynom(x,y,2)
,该公式指定lambda(x,y) = exp(a + bx + cy + dxy + ex^2 + fy^2)
,包括所有2阶的术语。
总体而言,如果强度取决于空间位置,那么您可以假设强度遵循特定的函数形式(通过指定模型公式)或通过核平滑或类似方法非参数地估计强度。如果没有有关强度形式的其他信息,那么估计它的方式没有对错之分。
您还可以选择使用非参数方法,首先通过核平滑等方法估计强度,例如
LambdaX <- density(ppdata, bw.ppp, at="points", leaveoneout=TRUE, positive=TRUE)
然后
K <- Kinhom(ppdata, LambdaX)
M <- thomas.estK(K)
然后M
给出了不均匀Thomas过程的拟合集群参数。或者,如果您想要一个kppm
对象,
Lambda <- density(ppdata, bw.ppp, positive=TRUE)
M <- kppm(ppdata ~ offset(log(Lambda)), clusters="Thomas", method="palm")
最后要注意的一点。
在上述所有示例中,假定了一种特定的不均匀性,这使得模型拟合非常方便。仅仅知道模式是不均匀的并不保证它具有这种特定、方便的不均匀性。有关详细信息,请参阅spatstat书的第12章。
英文:
> Is there a recommended minimum sample size consideration when fitting a cluster process model to get reliable estimates for the model parameters?
This is a topic of current research. The answer depends on the strength and range of clustering (as well as on the definition of "reliable" estimates). Most of the standard test case examples contain 100 to 200 points.
> If it is known that the point pattern is inhomogeneous and the intensity varies with x and y, is it correct to include x and y as an interaction term in the model? In my scenario I think a modified Thomas model would be ideal. So will the following be correct in implementing this?
kppm(ppdata ~ x*y, clusters ="Thomas", method = "palm", statistic = "Kinhom")
The argument statistic="Kinhom"
is only relevant when method="mincontrast"
and it is ignored when method="palm"
.
In a formula, x*y
means x + y + x:y
. When the covariates x
and y
are numeric, x:y
means xy
. So the formula ppdata~x*y
specifies that the intensity function takes the form lambda(x,y) = exp(a + bx + cy + dxy)
where a,b,c,d
are coefficients that will be estimated. If you're including the term xy
you may as well include all the terms of order 2, using the formula ppdata~polynom(x,y,2)
which specifies lambda(x,y) = exp(a + bx + cy + dxy + ex^2 + fy^2)
.
In general terms, if the intensity depends on spatial location then you can either assume that the intensity follows a particular functional form (by specifying a model formula) or estimate the intensity nonparametrically, by kernel smoothing or similar methods. If there's no additional information about the form of the intensity then there's no right or wrong way to estimate it.
You could alternatively use a nonparametric approach, first estimating the intensity by kernel smoothing (for example) as
LambdaX <- density(ppdata, bw.ppp, at="points", leaveoneout=TRUE, positive=TRUE)
Then
K <- Kinhom(ppdata, LambdaX)
M <- thomas.estK(K)
Then M
gives the fitted cluster parameters of the inhomogeneous Thomas process. Alternatively if you want to have a kppm
object,
Lambda <- density(ppdata, bw.ppp, positive=TRUE)
M <- kppm(ppdata ~ offset(log(Lambda)), clusters="Thomas", method="palm")
Finally a word of caution.
In all of the above examples, a particular kind of inhomogeneity is assumed, which allows very convenient model-fitting. Simply knowing that the pattern is inhomogeneous does not guarantee that it has this particular, convenient type of inhomogeneity. For further information see Chapter 12 of the spatstat book.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论