markcorr(spatstat)
markcorr()所属R语言包:spatstat
Mark Correlation Function
马克相关功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Estimate the marked correlation function of a marked point pattern.
估计点模式的一个显着显着的相关功能。
用法----------Usage----------
markcorr(X, f = function(m1, m2) { m1 * m2}, r=NULL,
correction=c("isotropic", "Ripley", "translate"),
method="density", ...,
f1=NULL, normalise=TRUE, fargs=NULL)
参数----------Arguments----------
参数:X
The observed point pattern. An object of class "ppp" or something acceptable to as.ppp.
观测点的模式。类的一个对象"ppp"或接受的as.ppp的东西。
参数:f
Optional. Test function f used in the definition of the mark correlation function. An R function with at least two arguments. There is a sensible default.
可选。 Test函数f中使用的标记相关函数的定义。 R的功能至少有两个参数,有一个合理的默认。
参数:r
Optional. Numeric vector. The values of the argument r at which the mark correlation function k[f](r) should be evaluated. There is a sensible default.
可选。数字矢量。的参数的值r标记相关函数k[f](r)应进行评估。有一个合理的默认。
参数:correction
A character vector containing any selection of the options "isotropic", "Ripley", "translate", "none" or "best". It specifies the edge correction(s) to be applied.
字符向量含有任何选择的选项"isotropic","Ripley","translate","none"或"best"。指定,边缘校正(S)。
参数:method
A character vector indicating the user's choice of density estimation technique to be used. Options are "density", "loess", "sm" and "smrep".
要使用的字符向量表示用户选择的密度估计技术。选项"density","loess","sm"和"smrep"。
参数:...
Arguments passed to the density estimation routine (density, loess or sm.density) selected by method.
传递参数的密度估计程序(density,loess或sm.density)选择method。
参数:f1
An alternative to f. If this argument is given, then f is assumed to take the form f(u,v)=f1(u) * f1(v).
替代f。如果此参数,那么f假定采取的形式f(u,v)=f1(u) * f1(v)。
参数:normalise
If normalise=FALSE, compute only the numerator of the expression for the mark correlation.
如果normalise=FALSE,只计算为标志相关分子的表达。
参数:fargs
Optional. A list of extra arguments to be passed to the function f or f1.
可选。额外的参数传递给函数的列表f或f1。
Details
详细信息----------Details----------
By default, this command calculates an estimate of Stoyan's mark correlation k[mm](r) for the point pattern.
默认情况下,此命令的斯托扬的标记相关k[mm](r)点模式计算的估计。
Alternatively if the argument f or f1 is given, then it calculates Stoyan's generalised mark correlation k[f](r) with test function f.
另外,如果参数f或f1,,然后计算斯托扬的广义标记相关k[f](r)测试功能f。
Theoretical definitions are as follows (see Stoyan and Stoyan (1994, p. 262)):
理论的定义如下(见斯托扬和斯托扬(1994年,第262页)):
For a point process X with numeric marks, Stoyan's mark correlation function k[mm](r), is
换一个角度X用数字标记,斯托扬的标记相关功能k[mm](r),是
where E[0u] denotes the conditional expectation given that there are points of the process at the locations 0 and u separated by a distance r, and where M(0),M(u) denote the marks attached to these two points. On the denominator, M,M' are random marks drawn independently from the marginal distribution of marks, and E is the usual expectation.
其中E[0u]表示给定的条件的期望的位置处的过程中,还有点0和u的距离r分离,以及其中M(0),M(u)表示连接到这两个点的标记。分母,M,M'是随机的独立商标的边际分布绘制的标记,和E是通常的期望。
For a multitype point process X, the mark correlation is
对于多类型的点过程X,该商标相关性
where P and P[0u] denote the probability and conditional probability.
P和P[0u]表示概率和条件概率。
The generalised mark correlation function k[f](r) of a marked point process X, with test function f, is
广义的标记相关功能k[f](r)的标记点的过程X,测试功能f,是
The test function f is any function f(m1,m2) with two arguments which are possible marks of the pattern, and which returns a nonnegative real value. Common choices of f are: for continuous nonnegative real-valued marks,
测试功能f任何功能f(m1,m2)有两个参数,这是可能的商标的图案,并返回一个非负的实际价值。常见的选择f是:连续非负实值标记,
for discrete marks (multitype point patterns),
为的离散标记(多类型,点模式),
and for marks taking values in [0,2 * pi),
和标记值[0,2 * pi),
.
。
Note that k[f](r) is not a “correlation” in the usual statistical sense. It can take any nonnegative real value. The value 1 suggests “lack of correlation”: if the marks attached to the points of X are independent and identically distributed, then k[f](r) = 1. The interpretation of values larger or smaller than 1 depends on the choice of function f.
请注意,k[f](r)是不是一个在通常的统计意义上的“相关性”。它可以使用任何非负实值。值1建议“缺乏相关性”:如果标记点的X是独立同分布的,那么k[f](r) = 1。大于或小于1的值的解释依赖于选择的功能f。
The argument X must be a point pattern (object of class "ppp") or any data that are acceptable to as.ppp. It must be a marked point pattern.
参数X必须是点模式(类的对象"ppp")或任何数据到as.ppp是可以接受的。它必须是一个显着的点模式。
The argument f determines the function to be applied to pairs of marks. It has a sensible default, which depends on the kind of marks in X. If the marks are numeric values, then f <- function(m1, m2) { m1 * m2} computes the product of two marks. If the marks are a factor (i.e. if X is a multitype point pattern) then f <- function(m1, m2) { m1 == m2} yields the value 1 when the two marks are equal, and 0 when they are unequal. These are the conventional definitions for numerical marks and multitype points respectively.
参数f确定要施加到对标志的功能。它有一个合理的默认,这取决于种标记X。如果标记是数值,那么f <- function(m1, m2) { m1 * m2}计算的两个主要标志的产品。如果标记是一个因素(即X是一个多类型的点模式),然后f <- function(m1, m2) { m1 == m2}产生的值为1时,这两个标记都是平等的,0的时候,他们是不平等的。这些都是传统的定义的数值标记和多类型百分点。
The argument f may be specified by the user. It must be an R function, accepting two arguments m1 and m2 which are vectors of equal length containing mark values (of the same type as the marks of X). (It may also take additional arguments, passed through fargs). It must return a vector of numeric values of the same length as m1 and m2. The values must be non-negative, and NA values are not permitted.
可能是由用户指定的参数f。它必须是一个R函数,接受两个参数m1和m2是含有相等的长度的标记值的向量(为X的标记相同的类型)。 (也可能需要额外的参数,通过fargs)。它必须返回一个的矢量具有相同的长度的数值作为m1和m2。该值必须是非负的,NA的值是不允许的。
Alternatively the user may specify the argument f1 instead of f. This indicates that the test function f should take the form f(u,v)=f1(u) * f1(v) where f1(u) is given by the argument f1. The argument f1 should be an R function with at least one argument. (It may also take additional arguments, passed through fargs).
此外,用户可以指定参数f1,而不是f。这表明测试功能f应采取的形式f(u,v)=f1(u) * f1(v)f1(u)的说法f1。参数f1至少有一个参数应该是R功能。 (也可能需要额外的参数,通过fargs)。
The argument r is the vector of values for the distance r at which k[f](r) is estimated.
参数r是矢量的距离r,k[f](r)估计值。
This algorithm assumes that X can be treated as a realisation of a stationary (spatially homogeneous) random spatial point process in the plane, observed through a bounded window. The window (which is specified in X as X$window) may have arbitrary shape.
此算法假定X可以被视为一个实现了一个固定的(的空间均匀)随机空间点在飞机上,观察到有界的窗口。窗口(中指定XX$window的)可以有任意形状的。
Biases due to edge effects are treated in the same manner as in Kest. The edge corrections implemented here are
边缘效应产生的偏差的处理中相同的方式,当在Kest。这里实现的边缘修正
isotropic/Ripley Ripley's isotropic correction (see Ripley, 1988; Ohser, 1983). This is implemented only for rectangular and polygonal windows (not for binary masks).
各向同性/ Ripley旅游Ripley的各向同性修正(见里普利,1988; Ohser,1983年)。实现此方法仅适用于矩形和多边形窗口(而不是二进制口罩)。
translate Translation correction (Ohser, 1983). Implemented for all window geometries, but slow for complex windows.
翻译的翻译的校正(Ohser,1983)。实现所有窗口的几何形状,但速度缓慢复杂的Windows。
Note that the estimator assumes the process is stationary (spatially homogeneous).
请注意,估计假设的过程是平稳的(空间均匀)。
The numerator and denominator of the mark correlation function (in the expression above) are estimated using density estimation techniques. The user can choose between
标记相关函数(在上面的表达式)的分子和分母的估计使用密度估计技术。用户可以选择
which uses the standard kernel density estimation routine density, and works only for evenly-spaced r values;
它使用标准的内核密度估计程序density,仅适用于均匀分布的r值;
which uses the function loess in the package modreg;
使用功能loess包中的modreg;
which uses the function sm.density in the package sm and is extremely slow;
使用功能sm.density包中的sm和极其缓慢;
which uses the function sm.density in the package sm and is relatively fast, but may require manual control of the smoothing parameter hmult.
使用该函数sm.density,软件包中sm和是比较快的,但可能需要手动控制的平滑参数hmult。
If normalise=FALSE then the algorithm will compute only the numerator
如果normalise=FALSE那么该算法将只计算分子
of the expression for the mark correlation function.
的标记相关函数的表达式。
值----------Value----------
A function value table (object of class "fv") or a list of function value tables, one for each column of marks.
类的对象的函数值表("fv")或列表的函数值表,每列的标记之一。
An object of class "fv" (see fv.object) is essentially a data frame containing numeric columns
类的一个对象"fv"(见fv.object)本质上是一个数据框包含数字的列
参数:r
the values of the argument r at which the mark correlation function k[f](r) has been estimated
的参数的值的r在该标记相关函数k[f](r)已估计
参数:theo
the theoretical value of k[f](r) when the marks attached to different points are independent, namely 1
k[f](r)时的标记附加到不同的点是独立的,即1的理论值
together with a column or columns named "iso" and/or "trans", according to the selected edge corrections. These columns contain estimates of the mark correlation function k[f](r) obtained by the edge corrections named.
连同一列或多列名为"iso"和/或"trans",根据选定的边修正。这些列包含的标记相关功能的估计k[f](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----------
Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons.
参见----------See Also----------
Mark variogram markvario for numeric marks.
马克变差函数markvario数字标记。
Mark connection function markconnect and multitype K-functions Kcross, Kdot for factor-valued marks.
马克连接功能markconnect和多类型K-函数Kcross,Kdot因子值的标记。
markcorrint to estimate the indefinite integral of the mark correlation function.
markcorrint估计该商标的相关函数的不定积分。
实例----------Examples----------
# CONTINUOUS-VALUED MARKS:[连续值标记:]
# (1) Spruces[(1)云杉]
# marks represent tree diameter[标记代表树径]
data(spruces)
# mark correlation function[商标相关的功能]
ms <- markcorr(spruces)
plot(ms)
# (2) simulated data with independent marks[(2)与独立标记的模拟数据]
X <- rpoispp(100)
X <- X %mark% runif(X$n)
## Not run: [#不运行:]
Xc <- markcorr(X)
plot(Xc)
## End(Not run)[#(不执行)]
# MULTITYPE DATA:[多类型的数据:]
# Hughes' amacrine data[休斯的无长突单元的数据]
# Cells marked as 'on'/'off'[单元标记为“ON”/“关闭”]
data(amacrine)
# (3) Kernel density estimate with Epanecnikov kernel[(3)Epanecnikov内核的内核密度估计]
# (as proposed by Stoyan & Stoyan)[(所提出的斯托扬和斯托扬)]
M <- markcorr(amacrine, function(m1,m2) {m1==m2},
correction="translate", method="density",
kernel="epanechnikov")
plot(M)
# Note: kernel="epanechnikov" comes from help(density)[注:内核=“叶帕涅奇尼科夫”帮助(密度)]
# (4) Same again with explicit control over bandwidth[(4)再次明确地控制带宽]
## Not run: [#不运行:]
M <- markcorr(amacrine,
correction="translate", method="density",
kernel="epanechnikov", bw=0.02)
# see help(density) for correct interpretation of 'bw'[见帮助(密度)正确解释“体重”]
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|