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

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

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

                                         Diagnostic Plots for Fitted Point Process Model
                                         合身点过程模型的诊断图

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

描述----------Description----------

Given a point process model fitted to a point pattern, produce diagnostic plots based on residuals.
由于模式装到一个点一个点过程模型,基于残差诊断图。


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


  diagnose.ppm(object, ..., type="raw", which="all", sigma=NULL,
               rbord=reach(object), cumulative=TRUE,
               plot.it=TRUE, rv = NULL, compute.sd=TRUE,
               compute.cts=TRUE, typename, check=TRUE, repair=TRUE,
               oldstyle=FALSE)
  ## S3 method for class 'diagppm'
plot(x, ..., which,
               plot.neg="image", plot.smooth="imagecontour",
               plot.sd=TRUE, spacing=0.1,
               srange=NULL, monochrome=FALSE, main=NULL)



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

参数:object
The fitted point process model (an object of class "ppm") for which diagnostics should be produced. This object is usually obtained from ppm.  
拟合点过程模型(类的一个对象"ppm")的诊断应。这个对象通常是从ppm。


参数:type
String indicating the type of residuals or weights to be used. Current options are "eem" for the Stoyan-Grabarnik exponential energy weights, "raw" for the raw residuals, "inverse" for the inverse-lambda residuals, and "pearson" for the Pearson residuals. A partial match is adequate.  
字符串,用于指示要使用的类型的残差或重量的。当前选项"eem"的斯托扬Grabarnik指数的能源的权重,"raw"为原料的残差,"inverse"的逆-λ残差,和"pearson"的Pearson残差。部分匹配的是足够的。


参数:which
Character string or vector indicating the choice(s) of plots to be generated. Options are "all", "marks", "smooth", "x", "y" and "sum". Multiple choices may be given but must be matched exactly. See Details.  
的字符串或矢量的指示的选择(s)的图以产生。选项"all","marks","smooth","x","y"和"sum"。多可以选择的,但必须完全匹配。查看详细信息。


参数:sigma
Bandwidth for kernel smoother in "smooth" option.  
带宽为核心平滑"smooth"选项。


参数:rbord
Width of border to avoid edge effects. The diagnostic calculations will be confined to those points of the data pattern which are at least rbord units away from the edge of the window.  
边框的宽度,以避免边缘效应。诊断的计算将仅限于这些点的数据模式的至少rbord单位远离边缘的窗口。


参数:cumulative
Logical flag indicating whether the lurking variable plots for the x and y coordinates will be the plots of cumulative sums of marks (cumulative=TRUE) or the plots of marginal integrals of the smoothed residual field (cumulative=FALSE).  
逻辑标志,指示是否潜伏变量图x和y坐标图标记(cumulative=TRUE)或图的边缘平滑后的剩余磁场积分的累计总和( cumulative=FALSE“)。


参数:plot.it
Logical value indicating whether  plots should be shown. If plot.it=FALSE,  the computed diagnostic quantities are returned without plotting them.  
逻辑值,该值指示是否应显示图。如果plot.it=FALSE,计算出的诊断数量,绘制他们没有返回。


参数:plot.neg
One of "discrete" or "image" indicating how the density part of the residual measure should be plotted.  
其中"discrete"或"image"表示如何应绘制的密度的一部分残余措施。


参数:plot.smooth
One of "image", "persp", "contour" or "imagecontour" indicating how the smoothed residual field should be plotted.  
之一"image","persp","contour"或"imagecontour"如何应绘制平滑的剩余磁场。


参数:compute.sd,plot.sd
Logical values indicating whether  error bounds should be computed and added to the "x" and "y" plots. The default is TRUE for Poisson models and FALSE for non-Poisson models. See Details.  
逻辑值的误差范围是否应计算并添加到"x"和"y"图。默认值是TRUE泊松模型和FALSE非泊松模型。查看详细信息。


参数:rv
Usually absent. Advanced use only. If this argument is present, the values of the residuals will not be calculated from the fitted model object but will instead be taken directly from rv.  
通常不存在。高级方可使用。如果这种说法是存在的,将不进行计算的值的残差拟合模型object,而将采取直接从rv。


参数:spacing
The spacing between plot panels (when a four-panel plot is generated) expressed as a fraction of the width of the window of the point pattern.  
图面板(当四个面板的图生成)之间的间距表示为点图案的窗口的宽度的一小部分。


参数:srange
Vector of length 2 that will be taken as giving the range of values of the smoothed residual field, when generating an image plot of this field. This is useful if you want to generate diagnostic plots for two different fitted models using the same colour map.   
向量的长度为2,将被视为给予的平滑的残余电场的范围内的值,生成映像时图此输入。这是非常有用的,如果你想生成两个不同的拟合模型,使用相同的彩色图的诊断图。


参数:monochrome
Flag indicating whether images should be displayed in greyscale (suitable for publication) or in colour (suitable for the screen). The default is to display in colour.  
指示是否应显示图像灰度(适合出版)或颜色(适合屏幕)。默认情况下是显示的颜色。


参数:check
Logical value indicating whether to check the internal format of object. If there is any possibility that this object has been restored from a dump file, or has otherwise lost track of the environment where it was originally computed, set check=TRUE.   
逻辑值,该值指示是否要检查的内部格式object。如果有任何可能,这个对象已经从dump文件中恢复,或以其他方式失去它最初被计算的环境中,设置check=TRUE。


参数:repair
Logical value indicating whether to repair the internal format of object, if it is found to be damaged.   
逻辑值,该值指示是否要修复的内部格式object,如果它被发现损坏。


参数:oldstyle
Logical flag indicating whether error bounds should be plotted using the approximation given in the original paper (oldstyle=TRUE), or using the correct asymptotic formula (oldstyle=FALSE).  
逻辑标志指示的误差范围是否应使用近似的原始文件(绘制oldstyle=TRUE),或使用正确的渐近公式(oldstyle=FALSE)。


参数:x
The value returned from a previous call to  diagnose.ppm. An object of class "diagppm".  
的价值返回从以前调用diagnose.ppm。对象的类"diagppm"。


参数:typename
String to be used as the name of the residuals.
被用来作为残差的名称的字符串。


参数:main
Main title for the plot.
主标题的图。


参数:...
Extra arguments, controlling either the resolution of the smoothed image (passed from diagnose.ppm to density.ppp)  or the appearance of the plots (passed from diagnose.ppm to plot.diagppm and from  plot.diagppm to plot.default).  
额外的参数,控制分辨率的平滑图像(通过diagnose.ppm到density.ppp)的外观图(通过从diagnose.ppm到plot.diagppm从plot.diagppmplot.default)。


参数:compute.cts
Advanced use only.
高级方可使用。


Details

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

This function generates several diagnostic plots for a fitted point process model. The plots display the residuals from the fitted model (Baddeley et al, 2005) or alternatively the "exponential energy marks" (Stoyan and Grabarnik, 1991). These plots can be used to assess goodness-of-fit, to identify outliers in the data, and to reveal departures from the fitted model. See also the companion function qqplot.ppm.
这个函数生成的安装点过程模型的几个诊断图。该图显示了从拟合模型(巴德利等人,2005)或交替“指数能源马克(斯托扬和Grabarnik的,1991)的残差。这些图可以用来评估善良的配合,识别异常值的数据,并以显示拟合模型的背离。伴侣功能qqplot.ppm。

The argument object must be a fitted point process model (object of class "ppm") typically produced by the maximum pseudolikelihood fitting algorithm ppm).
参数object必须是一个安装点过程模型(类的对象"ppm")的的最大pseudolikelihood拟合算法通常是由ppm)。

The argument type selects the type of residual or weight that will be computed. Current options are:
的参数type选择的类型残留或重量,将计算。当前选项:

exponential energy marks (Stoyan and Grabarnik, 1991)  computed by eem. These are positive weights attached to the data points (i.e. the points of the point pattern dataset to which the model was fitted). If the fitted model is correct, then the sum of these weights for all data points in a spatial region B has expected value equal to the area of B. See eem for further explanation.
指数的能源标记(斯托扬和Grabarnik,1991)计算的eem。这些都是积极的权重,数据点(即点的点模式,模型拟合的数据集)。如果合适的模型是正确的,那么所有的数据点在空间区域B这些权重的总和已经预计值等于该区域的B。见eem作进一步的解释。

point process residuals (Baddeley et al, 2005) computed by the function residuals.ppm. These are residuals attached both to the data points and to some other points in the window of observation (namely, to the dummy points of the quadrature scheme used to fit the model). If the fitted model is correct, then the sum of the residuals in a spatial region B has mean zero. The options are
计算的功能residuals.ppm点加工残余物(巴德利等人,2005)。这些附加的数据点和观察(即,正交计划用于拟合模型的虚拟点)在窗口中的其他一些点的残差。如果合适的模型是正确的,那么在空间区域的残差的总和B平均为零。选项

"raw": the raw residuals;
"raw":原始残差;

"inverse": the "inverse-lambda" residuals, a counterpart of the exponential energy weights;
"inverse":“反拉姆达的残留物,能源的权重对应的指数;

"pearson": the Pearson residuals.
"pearson":Pearson残差。

See residuals.ppm for further explanation.
见residuals.ppm作进一步的解释。

The argument which selects the type of plot that is produced. Options are:
参数which,选择的类型图。选项有:

plot the residual measure. For the exponential energy weights (type="eem") this displays circles centred at the points of the data pattern, with radii proportional to the exponential energy weights. For the residuals (type="raw", type="inverse" or type="pearson") this again displays circles centred at the points of the data pattern with radii proportional to the (positive) residuals, while the plotting of the negative residuals depends on the argument plot.neg. If plot.neg="image" then the negative part of the residual measure, which is a density, is plotted as a colour image. If plot.neg="discrete" then the discretised negative residuals (obtained by approximately integrating the negative density using the quadrature scheme of the fitted model) are plotted as squares centred at the dummy points with side lengths proportional to the (negative) residuals. [To control the size of the circles and squares, use the argument maxsize.]
绘制残余措施。对于指数能量重量(type="eem")当前显示的数据模式的点处的圆心,半径成比例的指数能量重量。对于的残差(type="raw",type="inverse"或type="pearson")这再次显示的点处的数据模式的半径成比例的(正)残差圆心,而绘制的负残差取决于参数plot.neg。如果plot.neg="image"然后负部分残余的措施,这是一个密度,作为彩色图像绘制。如果plot.neg="discrete"然后(通过以下方式获得约集成的负密度使用拟合模型正交计划)的离散化的负残差绘制为正方形中心在虚设点与边的长度成比例的(负)残差。为了控制大小的圆形,方形,使用参数maxsize。]

plot a kernel-smoothed version of the residual measure. Each data or dummy point is taken to have a "mass" equal to its residual or exponential energy weight. (Note that residuals can be negative). This point mass is then replaced by a bivariate isotropic Gaussian density with standard deviation sigma. The value of the smoothed residual field at any point in the window is the sum of these weighted densities. If the fitted model is correct, this smoothed field should be flat, and its height should be close to 0 (for the residuals) or 1 (for the exponential energy weights). The field is plotted either as an image, contour plot or perspective view of a surface, according to the argument plot.smooth. The range of values of the smoothed field is printed if the option which="sum" is also selected.
绘制一个内核平滑版本的残余措施。每个数据或虚拟点有一个大众等于其剩余或指数的能量权重。 (请注意,残差可以是负的)。这一点的质量会被替换为一个二元各向同性的高斯密度与标准差sigma。在窗口中的任何点处的值的平滑的残余电场是这些加权密度的总和。如果合适的模型是正确的,这应该是平滑的领域平坦,其高度应接近0(残差)或1(重量)的指数能源。该字段是绘制或者作为一个图像,等高线图或一个表面的透视图,根据的论点plot.smooth。平滑的字段值的范围是书面的,如果选项“which="sum"也被选中。

produce a "lurking variable" plot for the x coordinate. This is a plot of h(x) against x (solid lines) and of E(h(x)) against x (dashed lines), where h(x) is defined below, and E(h(x)) denotes the expectation of h(x) assuming the fitted model is true.
生产的“潜伏变量的图x坐标。这是一张h(x)对x(实线)和E(h(x))对x(虚线),其中h(x)的定义如下,和 E(h(x))表示的期望h(x)假设的拟合模型是真实的。

if cumulative=TRUE then h(x) is the cumulative sum of the weights or residuals for all points which have X coordinate less than or equal to x. For the residuals E(h(x)) = 0, and for the exponential energy weights E(h(x)) =  area of the subset of the window to the left of the line X=x.
如果cumulative=TRUE然后h(x),X协调小于或等于x的所有点的权重或残留的累计总和。对于残差E(h(x)) = 0,和指数能量重量E(h(x)) = 面积的子集的窗口的左侧的线X=x。

if cumulative=FALSE then  h(x) is the marginal integral of  the smoothed residual field (see the case which="smooth" described above) on the x axis.  This is approximately the derivative of the plot for cumulative=TRUE. The value of h(x) is computed by summing the values of the smoothed residual field over all pixels with the given x coordinate.  For the residuals E(h(x)) = 0, and for the exponential energy weights E(h(x)) =  length of the intersection between the observation window and the line X=x.
如果cumulative=FALSE然后h(x)是边缘平滑后的剩余磁场积分的情况下which="smooth"上述的x轴。这是约的衍生的图为cumulative=TRUE。 h(x)的值的计算方法是所有像素的平滑的残余电场的值相加,用给定的x坐标。对于残差E(h(x)) = 0,和的指数能量重量E(h(x)) = 长度的交点之间的观察窗和线X=x。

If plot.sd = TRUE, then superimposed on the lurking variable plot are the pointwise two-standard-deviation error limits for h(x) calculated for the inhomogeneous Poisson process. The default is plot.sd = TRUE for Poisson models and plot.sd = FALSE for non-Poisson models.
如果plot.sd = TRUE,对潜伏变量图的再叠加是逐点两个标准偏差限制h(x)计算的非齐次泊松过程。默认值是plot.sd = TRUE泊松模型和plot.sd = FALSE非泊松模型。

produce a similar lurking variable plot for the y coordinate.
产生类似的潜伏变量y坐标图。

print the sum of the weights or residuals for all points in the window (clipped by a margin rbord if required) and the area of the same window. If the fitted model is correct the sum of the exponential energy weights should equal the area of the window, while the sum of the residuals should equal zero. Also print the range of values of the smoothed field displayed in the "smooth" case.
打印的总和,在窗口中的所有的点的权重或残差(由边际剪裁rbord如果需要)和相同的窗口的面积。如果拟合模型是正确的指数能量重量的总和应等于窗口的面积,而残差的总和应等于零。还可以打印在"smooth"情况下的平滑的字段显示的范围内的值。

All four of the diagnostic plots listed above are plotted together in a two-by-two display. Top left panel is "marks" plot. Bottom right panel is "smooth" plot. Bottom left panel is "x" plot. Top right panel is "y" plot, rotated 90 degrees.
所有上面列出的诊断图4绘制在一起在两两个显示。面板左上角是"marks"图。右下方的面板是"smooth"图。左下面板"x"图。右上的面板是"y"图,旋转90度。

The argument rbord ensures there are no edge effects in the computation of the residuals. The diagnostic calculations will be confined to those points of the data pattern which are at least rbord units away from the edge of the window. The value of rbord should be greater than or equal to the range of interaction permitted in the model.
参数rbord确保在计算残差有没有边缘效应。诊断的计算将仅限于这些点的数据模式的至少rbord单位远离边缘的窗口。 rbord的值应该是大于或等于相互作用模型中的允许的范围内。

By default, the two-standard-deviation limits are calculated from the exact formula for the asymptotic variance of the residuals under the asymptotic normal approximation, equation (37) of Baddeley et al (2006). However, for compatibility with the original paper of Baddeley et al (2005), if oldstyle=TRUE, the two-standard-deviation limits are calculated using the innovation variance, an over-estimate of the true variance of the residuals.
默认情况下,两个标准差的范围进行计算的精确公式的渐近方差的渐近正态近似,方程(37),亚伦 - 巴德利等人(2006)的残差下。然而,巴德利等人(2005)的原始文件的兼容性,如果oldstyle=TRUE,两个标准差的范围进行计算,使用创新的差异,高估的真实方差的残差。

The argument rv would normally be used only by experts. It enables the user to substitute arbitrary values for the residuals or marks, overriding the usual calculations. If rv is present, then instead of calculating the residuals from the fitted model, the algorithm takes the residuals from the object rv, and plots them in the manner appropriate to the type of residual or mark selected by type. If type ="eem" then rv should be similar to the return value of eem, namely, a numeric vector of length equal to the number of points in the original data point pattern. Otherwise, rv should be similar to the return value of residuals.ppm, that is, it should be an object of class "msr" (see msr) representing a signed measure.
参数rv通常会使用唯一的专家。它使用户能够替换的任意值的残差或标记,重写通常的计算。如果rv存在,则不用计算的残差拟合模型,算法需要的残差对象rv,他们图的方式适当类型的残余或标记选择type。如果type ="eem"然后rv的返回值应该是相似的eem,即一个数值向量的长度相等的点的数量在原始数据点模式。否则,rv应该是类似的residuals.ppm的返回值,那就是,它应该是一个类的对象"msr"(见msr)表示一个有符号的措施。

The return value of diagnose.ppm is an object of class "diagppm". There are methods for plot and print for such objects. See the Examples.
diagnose.ppm的返回值是一个对象类"diagppm"。有plot和print这样的对象的方法。请参阅范例。

See also the companion functions qqplot.ppm, which produces a Q-Q plot of the residuals, and lurking, which produces lurking variable plots for any spatial covariate.
另请参阅伴侣功能qqplot.ppm,产生的残差的QQ图,和lurking,产生潜伏的任何空间的协变量的变量图。


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

An object of class "diagppm" which contains the coordinates needed to reproduce the selected plots. This object can be plotted using plot.diagppm and printed using print.diagppm.
对象的类"diagppm"包含的坐标,需要复制选定的图。这个对象可以被绘制使用plot.diagppm和印刷print.diagppm。


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

Residual analysis for spatial point processes. Journal of the Royal Statistical Society, Series B 67, 617&ndash;666.
Properties of residuals for spatial point processes. Annals of the Institute of Statistical Mathematics 60, 627&ndash;649.
Second-order characteristics for stochastic structures connected with Gibbs point processes. Mathematische Nachrichten, 151:95&ndash;100.

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

residuals.ppm, eem, ppm.object, qqplot.ppm, lurking, ppm
residuals.ppm,eem,ppm.object,qqplot.ppm,lurking,ppm


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


    data(cells)
    fit <- ppm(cells, ~x, Strauss(r=0.15))
    diagnose.ppm(fit)
    ## Not run: [#不运行:]
    diagnose.ppm(fit, type="pearson")
   
## End(Not run)[#(不执行)]
    diagnose.ppm(fit, which="marks")
    diagnose.ppm(fit, type="raw", plot.neg="discrete")

    # save the diagnostics and plot them later[保存的诊断和绘制出来后]
    u <- diagnose.ppm(fit, rbord=0.15, plot.it=FALSE)
    ## Not run: [#不运行:]
    plot(u)
    plot(u, which="marks")
   
## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-15 01:06 , Processed in 0.023113 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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