找回密码
 注册
查看: 543|回复: 0

R语言 spatstat包 density.ppp()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 13:21:41 | 显示全部楼层 |阅读模式
density.ppp(spatstat)
density.ppp()所属R语言包:spatstat

                                        Kernel Smoothed Intensity of Point Pattern
                                         内核平滑点格局强度

                                         译者:生物统计家园网 机器人LoveR

----------Description----------

Compute a kernel smoothed intensity function from a point pattern.
计算内核平滑的强度函数从一个点模式。


用法----------Usage----------


  ## S3 method for class 'ppp'
density(x, sigma, ...,
        weights, edge=TRUE, varcov=NULL,
        at="pixels", leaveoneout=TRUE,
        adjust=1, diggle=FALSE)



参数----------Arguments----------

参数:x
Point pattern (object of class "ppp").  
点模式(类的对象"ppp")。


参数:sigma
Standard deviation of isotropic Gaussian smoothing kernel. Either a numerical value, or a function that computes an appropriate value of sigma.  
各向同性的高斯平滑内核的标准偏差。一个数值,或一个函数,计算一个适当的值sigma。


参数:weights
Optional vector of weights to be attached to the points. May include negative values.   
可选的权重向量要附加到的点。可能包括负值。


参数:...
Arguments passed to as.mask to determine the pixel resolution.  
参数传递给as.mask的来确定像素的分辨率。


参数:edge
Logical flag: if TRUE, apply edge correction.  
逻辑标志:如果TRUE,应用边缘校正。


参数:varcov
Variance-covariance matrix of anisotropic Gaussian kernel. Incompatible with sigma.  
方差 - 协方差矩阵的各向异性高斯内核。不相容的sigma。


参数:at
String specifying whether to compute the intensity values at a grid of pixel locations (at="pixels") or only at the points of x (at="points").  
字符串,用于指定是否要计算的强度值的像素位置的网格(at="pixels")或仅在点x(at="points")。


参数:leaveoneout
Logical value indicating whether to compute a leave-one-out estimator. Applicable only when at="points".  
逻辑值,该值指示是否计算留一出估计。只适用于当at="points"。


参数:adjust
Optional. Adjustment factor for the smoothing parameter.  
可选。的平滑参数的调整因数。


参数:diggle
Logical. If TRUE, use Diggle's edge correction, which is more accurate but slower to compute than the correction described under Details.  
逻辑。如果TRUE,使用Diggle的边缘校正,这是比“详细信息”下所述的校正更精确的计算,但速度慢。


Details

详细信息----------Details----------

This is a method for the generic function density.
这是一个方法的通用函数density。

It computes a fixed-bandwidth kernel estimate  (Diggle, 1985) of the intensity function of the point process that generated the point pattern x.
它计算出一个固定带宽的核估计(Diggle,1985年)的点过程的强度函数生成的点模式x。

By default it computes the convolution of the isotropic Gaussian kernel of standard deviation sigma with point masses at each of the data points in x. Anisotropic Gaussian kernels are also supported. Each point has unit weight, unless the argument weights is given (it should be a numeric vector; weights can be negative or zero).
默认情况下,计算的高斯卷积内核的标准差sigma点群众中的每一个数据点x。各向异性高斯核的支持。每个点的单位重量,除非参数weights(这应该是一个数值向量的权重可以是负数或零)。

If edge=TRUE, the intensity estimate is corrected for edge effect bias in one of two ways:
如果edge=TRUE,强度估计修正的边缘效应偏倚以下两种方法之一:

If diggle=FALSE (the default) the intensity estimate is correted by dividing it by the convolution of the Gaussian kernel with the window of observation. Thus the intensity value at a point u is
如果diggle=FALSE(默认值)的强度估算correted除以观察窗口的高斯核的卷积。这样的强度值在一个点u是

where k is the Gaussian smoothing kernel, e(u) is an edge correction factor,  and w[i] are the weights.
k是高斯平滑核,e(u)是一个边缘的修正系数,w[i]的权重。

If diggle=TRUE then the method of Diggle (1985) is followed exactly. The intensity value at a point u is
如果diggle=TRUE然后严格遵守Diggle(1985)的方法。强度值在一个点u

where again k is the Gaussian smoothing kernel, e(x[i]) is an edge correction factor,  and w[i] are the weights. This computation is slightly slower but more accurate.
在那里再次k是高斯平滑核,e(x[i])是一个边缘的修正系数,w[i]的权重。这种计算速度较慢,但更准确的。

In both cases, the edge correction term e(u) is the reciprocal of the kernel mass inside the window:
在这两种情况下,边缘校正项e(u)是在窗口内的内核质量的倒数:

where W is the observation window.
W是观察窗口。

The smoothing kernel is determined by the arguments sigma, varcov and adjust.
平滑内核的参数是由sigma,varcov和adjust。

if sigma is a single numerical value, this is taken as the standard deviation of the isotropic Gaussian kernel.
如果sigma是一个单一的数值,这是作为各向同性的高斯核的标准偏差。

alternatively sigma may be a function that computes an appropriate bandwidth for the isotropic Gaussian kernel from the data point pattern by calling sigma(x). To perform automatic bandwidth selection using cross-validation, it is recommended to use the function bw.diggle.
或者sigma可能是一个函数,计算一个合适的带宽从数据上看模式的高斯内核通过调用sigma(x)。要执行自动选择带宽使用交叉验证,建议使用的功能bw.diggle。

The smoothing kernel may be chosen to be any Gaussian kernel, by giving the variance-covariance matrix varcov. The arguments sigma and varcov are incompatible.
平滑内核可能被选择为任何高斯内核,通过给出的方差 - 协方差矩阵varcov。的参数sigma和varcov是不兼容的。

Alternatively sigma may be a vector of length 2 giving the standard deviations of two independent Gaussian coordinates, thus equivalent to varcov = diag(rep(sigma^2, 2)).
或者sigma可以是长度为2的矢量给出的标准偏差的两个独立的高斯坐标,从而相当于varcov = diag(rep(sigma^2, 2))。

if neither sigma nor varcov is specified, an isotropic Gaussian kernel will be used,  with a default value of sigma calculated by a simple rule of thumb that depends only on the size of the window.
如果没有sigma也不是varcov指定,高斯内核的默认值sigma通过一个简单的经验法则,只依赖于窗口的大小计算。

The argument adjust makes it easy for the user to change the bandwidth specified by any of the rules above. The value of sigma will be multiplied by the factor adjust. The matrix varcov will be multiplied by adjust^2. To double the smoothing bandwidth, set adjust=2.
参数adjust很容易让用户改变上述规则的任何规定的带宽。将成倍增加的因素sigmaadjust。的矩阵varcov将被乘以adjust^2。为了平滑带宽的两倍,设置adjust=2。

By default the intensity values are computed at every location u in a fine grid, and are returned as a pixel image. Computation is performed using the Fast Fourier Transform. Accuracy depends on the pixel resolution, controlled by the arguments ... passed to as.mask.
默认情况下的强度值计算的细网格,在每个位置上u,返回的是一个像素的图像。使用快速傅立叶变换进行计算。精度取决于像素的分辨率,控制的参数...传递给as.mask。

If at="points", the intensity values are computed  to high accuracy at the points of x only. Computation is performed by directly evaluating and summing the Gaussian kernel contributions without discretising the data. The result is a numeric vector giving the density values. The intensity value at a point x[i] is (if diggle=FALSE)
如果at="points",强度值,计算精度高点的x只。计算进行直接评估和采用高斯核的贡献没有discretising的数据总结。其结果是一个数值向量,给出的密度值。亮度值在一个点x[i](如果diggle=FALSE)

or (if diggle=TRUE)
或(如diggle=TRUE)

If leaveoneout=TRUE (the default), then the sum in the equation is taken over all j not equal to i, so that the intensity value at a data point is the sum of kernel contributions from all other data points. If leaveoneout=FALSE then the sum is taken over all j, so that the intensity value at a data point includes a contribution from the same point.
如果leaveoneout=TRUE(默认值),则公式中的总和接管所有的j不等于i,所以在一个数据点的强度值的总和内核的贡献从所有其它的数据点。如果leaveoneout=FALSE然后总和接管所有j,从而使在一个数据点的强度值包括从相同的点的贡献。

To select the bandwidth sigma automatically by cross-validation, use bw.diggle.
要选择带宽sigma自动交叉验证,使用bw.diggle。

To perform spatial interpolation of values that were observed at the points of a point pattern, use smooth.ppp.
要执行的点图案的点观察到的值的空间插值,使用smooth.ppp。

For adaptive nonparametric estimation, see adaptive.density. For data sharpening, see sharpen.ppp.
自适应非参数估计,adaptive.density。对于数据锐化,请参阅sharpen.ppp。

To compute a relative risk surface or probability map for two (or more) types of points, use relrisk.
要计算的相对的风险表面或概率的图为两个(或更多)类型的点,使用relrisk。


值----------Value----------

By default, the result is a pixel image (object of class "im").  Pixel values are estimated intensity values, expressed in “points per unit area”.
默认情况下,结果是一个像素的图像(类的对象"im"“)。像素值被估计的强度值,表示在“每单位面积的点”。

If at="points", the result is a numeric vector of length equal to the number of points in x. Values are estimated intensity values at the points of x.
如果at="points",结果是一个数值向量的长度相等的点的数量在x。估计值强度值在点x。

In either case, the return value has attributes "sigma" and "varcov" which report the smoothing bandwidth that was used.
在任一情况下,返回值有属性"sigma"和"varcov"报告的平滑使用的带宽。


注意----------Note----------

This function is often misunderstood.
此功能往往被误解。

The result of density.ppp is not a spatial smoothing  of the marks or weights attached to the point pattern. To perform spatial interpolation of values that were observed at the points of a point pattern, use smooth.ppp.
density.ppp的结果是不是空间平滑的商标或权重的点模式。要执行的点图案的点观察到的值的空间插值,使用smooth.ppp。

The result of density.ppp is not a probability density. It is an estimate of the intensity function of the point process that generated the point pattern data. Intensity is the expected number of random points per unit area. The units of intensity are “points per unit area”. Intensity is usually a function of spatial location, and it is this function which is estimated by density.ppp. The integral of the intensity function over a spatial region gives the expected number of points falling in this region.
的结果density.ppp是不是一个概率密度。它是一个估计的强度函数的点的过程中生成的点图案数据。强度是每单位面积的预期数量的随机点。强度的单位是“每单位面积的点”。强度通常是空间位置的函数,它是这样的函数,这是估计的density.ppp。在一个空间区域的强度函数的积分给出预期数目的点落在这个区域。

Inspecting an estimate of the intensity function is usually the first step in exploring a spatial point pattern dataset. For more explanation, see the workshop notes (Baddeley, 2008) or Diggle (2003).
检查的强度函数的估计通常是在探索一个空间点格局数据集的第一步。对于更多的解释,请参阅车间票据(巴德利,2008)或Diggle(2003年)。

If you have two (or more) types of points, and you want a probability map or relative risk surface (the spatially-varying probability of a given type), use relrisk.
如果你有两个(或更多)类型的点,你想的概率图或相对危险度表面(一个给定类型的空间变的概率),使用relrisk。


(作者)----------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----------

Workshop notes. CSIRO online technical publication. URL: <code>www.csiro.au/resources/pf16h.html</code>
A kernel method for smoothing point process data. Applied Statistics (Journal of the Royal Statistical Society, Series C) 34 (1985) 138&ndash;147.
Statistical analysis of spatial point patterns, Second edition. Arnold.

参见----------See Also----------

bw.diggle, smooth.ppp, sharpen.ppp, adaptive.density, relrisk, ppp.object, im.object
bw.diggle,smooth.ppp,sharpen.ppp,adaptive.density,relrisk,ppp.object,im.object


实例----------Examples----------


  data(cells)
  if(interactive()) {
    opa <- par(mfrow=c(1,2))
    plot(density(cells, 0.05))
    plot(density(cells, 0.05, diggle=TRUE))
    par(opa)
    v <- diag(c(0.05, 0.07)^2)
    plot(density(cells, varcov=v))
  }
  
  # automatic bandwidth selection[自动带宽选择]
  plot(density(cells, sigma=bw.diggle(cells)))
  # equivalent:[相当于:]
  plot(density(cells, bw.diggle))
  # evaluate intensity at points[评估各点的强度]
  density(cells, 0.05, at="points")

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-13 18:21 , Processed in 0.023233 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表