Kinhom(spatstat)
Kinhom()所属R语言包:spatstat
Inhomogeneous K-function
非均匀K-函数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Estimates the inhomogeneous K function of a non-stationary point pattern.
估计的不均匀K功能的非固定点模式。
用法----------Usage----------
Kinhom(X, lambda=NULL, ..., r = NULL, breaks = NULL,
correction=c("border", "bord.modif", "isotropic", "translate"),
renormalise=TRUE,
normpower=1,
nlarge = 1000,
lambda2=NULL, reciplambda=NULL, reciplambda2=NULL,
sigma=NULL, varcov=NULL)
参数----------Arguments----------
参数:X
The observed data point pattern, from which an estimate of the inhomogeneous K function will be computed. An object of class "ppp" or in a format recognised by as.ppp()
所观察到的数据点的图案,从将被计算的不均匀K函数的估计。一个对象的类"ppp"的或认可的as.ppp()的格式
参数:lambda
Optional. Values of the estimated intensity function. Either a vector giving the intensity values at the points of the pattern X, a pixel image (object of class "im") giving the intensity values at all locations, a fitted point process model (object of class "ppm") or a function(x,y) which can be evaluated to give the intensity value at any location.
可选。值的估计强度的功能。无论是矢量发出的格局X,一个像素的图像(类的对象"im")发出的强度值在所有地点,一个安装点过程模型(对象类的点的亮度值在"ppm")或function(x,y)可以进行评估,以在任何位置的强度值。
参数:...
Extra arguments. Ignored if lambda is present. Passed to density.ppp if lambda is omitted.
额外的参数。被忽略的,如果lambda存在。传递给density.ppp如果lambda省略。
参数:r
vector of values for the argument r at which the inhomogeneous K function should be evaluated. Not normally given by the user; there is a sensible default.
矢量参数的值r的不均匀K函数应该被评估。不正常的用户是一个明智的默认。
参数:breaks
An alternative to the argument r. Not normally invoked by the user. See Details.
替代到的参数r。通常不是由用户调用。查看详细信息。
参数:correction
A character vector containing any selection of the options "border", "bord.modif", "isotropic", "Ripley", "translate", "none" or "best". It specifies the edge correction(s) to be applied.
字符向量含有任何选择的选项"border","bord.modif","isotropic","Ripley","translate","none"或"best" 。指定,边缘校正(S)。
参数:renormalise
Logical. Whether to renormalise the estimate. See Details.
逻辑。无论到renormalise估计。查看详细信息。
参数:normpower
Integer (usually either 1 or 2). Normalisation power. See Details.
整数(通常是1或2)。标准化的力量。查看详细信息。
参数:nlarge
Optional. Efficiency threshold. If the number of points exceeds nlarge, then only the border correction will be computed, using a fast algorithm.
可选。效率的阈值。如果点的数量超过nlarge,只有边界校正计算,使用快速算法。
参数:lambda2
Advanced use only. Matrix containing estimates of the products lambda(x[i]) * lambda(x[j]) of the intensities at each pair of data points x[i] and x[j].
高级方可使用。基质中含有的产品的估计lambda(x[i]) * lambda(x[j])的每对数据点的强度在x[i]和x[j]。
参数:reciplambda
Alternative to lambda. Values of the estimated reciprocal 1/lambda of the intensity function. Either a vector giving the reciprocal intensity values at the points of the pattern X, a pixel image (object of class "im") giving the reciprocal intensity values at all locations, or a function(x,y) which can be evaluated to give the reciprocal intensity value at any location.
替代lambda。值的估计倒数1/lambda的强度功能。无论是向量的倒数强度值的点的格局X,一个像素的图像(类的对象"im")的倒数强度值在所有地点,或function(x,y)可以进行评估,得到的倒数,在任何位置的强度值。
参数:reciplambda2
Advanced use only. Alternative to lambda2. A matrix giving values of the estimated reciprocal products 1/(lambda(x[i]) * lambda(x[j])) of the intensities at each pair of data points x[i] and x[j].
高级方可使用。替代lambda2。矩阵的估计倒数产品的值1/(lambda(x[i]) * lambda(x[j]))的强度在每对数据点x[i]和x[j]。
参数:sigma,varcov
Optional arguments passed to density.ppp to control the smoothing bandwidth, when lambda is estimated by kernel smoothing.
可选参数传递给density.ppp控制的平滑带宽,当lambda核平滑估计。
Details
详细信息----------Details----------
This computes a generalisation of the K function for inhomogeneous point patterns, proposed by Baddeley, Moller and Waagepetersen (2000).
计算K功能不均匀的点模式,巴德利,穆勒和Waagepetersen,(2000年)提出的一个推广。
The “ordinary” K function (variously known as the reduced second order moment function and Ripley's K function), is described under Kest. It is defined only for stationary point processes.
“普通”K功能(不同程度降低的第二阶矩功能和里普利K函数),描述下Kest。它仅被定义为固定点的过程。
The inhomogeneous K function Kinhom(r) is a direct generalisation to nonstationary point processes. Suppose x is a point process with non-constant intensity lambda(u) at each location u. Define Kinhom(r) to be the expected value, given that u is a point of x, of the sum of all terms 1/lambda(x[j]) over all points x[j] in the process separated from u by a distance less than r. This reduces to the ordinary K function if lambda() is constant. If x is an inhomogeneous Poisson process with intensity function lambda(u), then Kinhom(r) = pi * r^2.
的不均匀K函数Kinhom(r)是直接推广到非平稳点过程。假设x与非恒定强度的lambda(u)在每个位置u是一个点的过程。定义Kinhom(r)是预期值,这u是一个点的x的所有条款1/lambda(x[j])所有点x[j]的总和,分开u的距离小于r的过程。这降低了普通K函数lambda()如果是恒定的。如果x是一个非齐次泊松过程的强度功能lambda(u),Kinhom(r) = pi * r^2的。
Given a point pattern dataset, the inhomogeneous K function can be estimated essentially by summing the values 1/(lambda(x[i]) * lambda(x[j])) for all pairs of points x[i], x[j] separated by a distance less than r.
给定一个点的图案的数据集,不均匀K函数可估计的值相加,基本上由1/(lambda(x[i]) * lambda(x[j]))为所有双点x[i], x[j]分开的距离小于r。
This allows us to inspect a point pattern for evidence of interpoint interactions after allowing for spatial inhomogeneity of the pattern. Values Kinhom(r) > pi * r^2 are suggestive of clustering.
这使我们能够INTERPOINT相互作用的证据后,检查点模式允许的空间不均匀性的图案。值Kinhom(r) > pi * r^2提示聚类。
The argument lambda should supply the (estimated) values of the intensity function lambda. It may be either
参数lambda应提供值(估计值)的强度功能lambda。它可以是
containing the values of the intensity function at the points of the pattern X.
含有的强度函数的值的点处的图案X。
(object of class "im") assumed to contain the values of the intensity function at all locations in the window.
(类的对象"im")假设在所有位置的窗口中包含的值的强度功能。
(object of class "ppm") whose fitted trend can be used as the fitted intensity.
(类的对象"ppm"),其嵌合可以用作拟合强度的趋势。
which can be evaluated to give values of the intensity at any locations.
它可以在任何地方进行评价,得到的强度的值。
if lambda is omitted, then it will be estimated using a "leave-one-out" kernel smoother.
lambda如果被省略,那么它会被估计顺畅的假期一出“内核。
If lambda is a numeric vector, then its length should be equal to the number of points in the pattern X. The value lambda[i] is assumed to be the the (estimated) value of the intensity lambda(x[i]) for the point x[i] of the pattern X. Each value must be a positive number; NA's are not allowed.
如果lambda是一个数值向量,那么其长度应等于在图案X的点的数量。值lambda[i]被假定为的(估计)值的强度lambda(x[i])点x[i]的图案X。每个值必须是一个正数,“NAs不允许。
If lambda is a pixel image, the domain of the image should cover the entire window of the point pattern. If it does not (which may occur near the boundary because of discretisation error), then the missing pixel values will be obtained by applying a Gaussian blur to lambda using blur, then looking up the values of this blurred image for the missing locations. (A warning will be issued in this case.)
如果lambda是一个像素的图像,图像域覆盖整个窗口的点模式。如果它没有(这可能会发生因为离散误差的边界附近),则丢失的像素值将通过以下方式获得lambda使用blur,然后寻找值施加一个高斯模糊失踪的地点的模糊图像。 (A会发出警告,在这种情况下)。
If lambda is a function, then it will be evaluated in the form lambda(x,y) where x and y are vectors of coordinates of the points of X. It should return a numeric vector with length equal to the number of points in X.
如果lambda是一个函数,然后将评估的形式lambda(x,y)其中x和y是向量的坐标点的X。它应该返回一个数值向量长度相等的点的数量在X。
If lambda is omitted, then it will be estimated using a "leave-one-out" kernel smoother, as described in Baddeley, Moller and Waagepetersen (2000). The estimate lambda[i] for the point X[i] is computed by removing X[i] from the point pattern, applying kernel smoothing to the remaining points using density.ppp, and evaluating the smoothed intensity at the point X[i]. The smoothing kernel bandwidth is controlled by the arguments sigma and varcov, which are passed to density.ppp along with any extra arguments.
如果lambda被省略,那么它会被估计使用顺畅的假期一出“内核,中所描述巴德利,穆勒和Waagepetersen的的(2000年)。的估计lambda[i]点X[i]的计算方法是删除X[i]点模式,应用核平滑剩下的点在使用density.ppp,平滑的强度和评估点X[i]。图像平滑用核的带宽的参数所控制的sigma和varcov,它被传递给density.ppp沿与任何额外的参数。
Edge corrections are used to correct bias in the estimation of Kinhom. Each edge-corrected estimate of Kinhom(r) is of the form
边缘校正被用来纠正偏置在估计Kinhom。每个边缘校正估计Kinhom(r)的形式是
where d[i,j] is the distance between points x[i] and x[j], and e(x[i],x[j],r) is an edge correction factor. For the "border" correction,
其中d[i,j]是点与点之间的距离x[i]和x[j],e(x[i],x[j],r)是一个边缘的修正系数。对于“边界”修正,
where b[i] is the distance from x[i] to the boundary of the window. For the "modified border" correction,
b[i]是x[i]的窗口边界的距离。为“修饰边框的修正,
where W [-] r is the eroded window obtained by trimming a margin of width r from the border of the original window. For the "translation" correction,
其中W [-] r是被侵蚀的窗口,通过修剪缘宽度r从原来的窗口的边界。对于“翻译”的修正,
and for the "isotropic" correction,
和“各向同性”校正,
where g(x[i],x[j]) is the fraction of the circumference of the circle with centre x[i] and radius ||x[i]-x[j]|| which lies inside the window.
其中g(x[i],x[j])是中心x[i]和半径||x[i]-x[j]||在于在窗口内的圆的圆周的馏分。
If renormalise=TRUE (the default), then the estimates are multiplied by c^normpower where c = area(W)/sum[i] (1/lambda(x[i])). This rescaling reduces the variability and bias of the estimate in small samples and in cases of very strong inhomogeneity. The default value of normpower is 1 (for consistency with previous versions of spatstat) but the most sensible value is 2, which would correspond to rescaling the lambda values so that sum[i] (1/lambda(x[i])) = area(W).
如果renormalise=TRUE(默认值),然后估计是乘以c^normpower其中 c = area(W)/sum[i] (1/lambda(x[i])). ,这重新标度降低的变化和偏差的估计很强的不均匀性在小样本的情况下。默认值normpower1(一致性与以前版本的spatstat),但最明智的值是2,这将符合重新lambda值,使 sum[i] (1/lambda(x[i])) = area(W). 比例
If the point pattern X contains more than about 1000 points, the isotropic and translation edge corrections can be computationally prohibitive. The computations for the border method are much faster, and are statistically efficient when there are large numbers of points. Accordingly, if the number of points in X exceeds the threshold nlarge, then only the border correction will be computed. Setting nlarge=Inf or correction="best" will prevent this from happening. Setting nlarge=0 is equivalent to selecting only the border correction with correction="border".
如果点模式X包含约1000点以上,各向同性和翻译的边缘的修正可以计算望而却步。的边界的计算方法快得多,而且在统计上有效的,当有大量的点。因此,如果点的数量在X超过阈值nlarge,那么只有边界校正将被计算。设置nlarge=Inf或correction="best"防止这种情况的发生。设置nlarge=0是相当于只选择边界校正correction="border"。
The pair correlation function can also be applied to the result of Kinhom; see pcf.
对相关功能也可以应用到的结果Kinhom看pcf。
值----------Value----------
An object of class "fv" (see fv.object).
类的一个对象"fv"(见fv.object)。
Essentially a data frame containing at least the following columns,
本质上是一个数据框,其中至少包含以下几列,
参数:r
the vector of values of the argument r at which Kinhom(r) has been estimated
矢量参数的值r,Kinhom(r)已经估计
参数:theo
vector of values of pi * r^2, the theoretical value of Kinhom(r) for an inhomogeneous Poisson process
pi * r^2Kinhom(r),理论值的非齐次泊松过程的数值向量
and containing additional columns according to the choice specified in the correction argument. The additional columns are named border, trans and iso and give the estimated values of Kinhom(r) using the border correction, translation correction, and Ripley isotropic correction, respectively.
并包含额外的列,根据correction参数中指定的选择。额外的列名为border,trans和iso和给出的估计值Kinhom(r)使用边框校正,翻译校正,和里普利各向同性的校正。
(作者)----------Author(s)----------
Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>
参考文献----------References----------
Non- and semiparametric estimation of interaction in inhomogeneous point patterns. Statistica Neerlandica 54, 329–350.
参见----------See Also----------
Kest, pcf
Kest,pcf
实例----------Examples----------
data(lansing)
# inhomogeneous pattern of maples[非均质模式的枫树]
X <- unmark(split(lansing)$maple)
# (1) intensity function estimated by model-fitting[(1)强度估计模型拟合函数]
# Fit spatial trend: polynomial in x and y coordinates[适合空间的趋势:在x和y坐标的多项式]
fit <- ppm(X, ~ polynom(x,y,2), Poisson())
# (a) predict intensity values at points themselves,[(一)预测点处的强度值本身,]
# obtaining a vector of lambda values[获得的λ值的矢量的]
lambda <- predict(fit, locations=X, type="trend")
# inhomogeneous K function[不均匀的K函数]
Ki <- Kinhom(X, lambda)
plot(Ki)
# (b) predict intensity at all locations,[(二)预测强度在所有地点,]
# obtaining a pixel image[获得一个像素的图像]
lambda <- predict(fit, type="trend")
Ki <- Kinhom(X, lambda)
plot(Ki)
# (2) intensity function estimated by heavy smoothing[(2)强度沉重的平滑函数估计]
Ki <- Kinhom(X, sigma=0.1)
plot(Ki)
# (3) simulated data: known intensity function[(3)模拟数据:已知强度功能]
lamfun <- function(x,y) { 50 + 100 * x }
# inhomogeneous Poisson process[非齐次泊松过程]
Y <- rpoispp(lamfun, 150, owin())
# inhomogeneous K function[不均匀的K函数]
Ki <- Kinhom(Y, lamfun)
plot(Ki)
# How to make simulation envelopes:[如何使模拟信封:]
# Example shows method (2)[实施例示出的方法(2)]
## Not run: [#不运行:]
smo <- density.ppp(X, sigma=0.1)
Ken <- envelope(X, Kinhom, nsim=99,
simulate=expression(rpoispp(smo)),
sigma=0.1, correction="trans")
plot(Ken)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|