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

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

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

                                         Fit Point Process Model to Data
                                         契合点过程模型数据

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

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

Fits a point process model to an observed point pattern
适用于一个点过程模型的观察点模式


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


   ppm(Q, trend=~1, interaction=Poisson(),
       ...,
       covariates=NULL,
       covfunargs = list(),
       correction="border",
       rbord=reach(interaction),
       use.gam=FALSE,
       method="mpl",
       forcefit=FALSE,
       project=FALSE,
       nd = NULL,
       gcontrol=list(),
       nsim=100, nrmh=1e5, start=NULL, control=list(nrep=nrmh),
       verb=TRUE)



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

参数:Q
A data point pattern (of class "ppp") to which the model will be fitted, or a quadrature scheme (of class "quad") containing this pattern.  
一个数据点模式(类"ppp")该模型将被安装,或正交计划(类"quad")包含此模式。


参数:trend
An R formula object specifying the spatial trend to be fitted.  The default formula, ~1, indicates the model is stationary and no trend is to be fitted.   
R的公式对象指定要安装的空间趋势。默认的公式,~1,表明该模型是静止的,没有趋势是要装的。


参数:interaction
An object of class "interact" describing the point process interaction structure, or NULL indicating that a Poisson process (stationary or nonstationary) should be fitted.  
类的一个对象"interact"描述的点过程的互动结构,或NULL表示,应安装固定或者非平稳泊松过程()。


参数:...
Ignored.
忽略。


参数:covariates
The values of any spatial covariates (other than the Cartesian coordinates) required by the model. Either a data frame, or a list whose entries are images, functions, windows or single numbers. See Details.  
模型所需的任何空间的协变量的值的(笛卡尔坐标以外)。一个数据框,或者是图像,功能,Windows或单个数字列表中的条目。查看详细信息。


参数:covfunargs
A named list containing the values of any additional arguments required by covariate functions.  
命名的列表,其中包含协功能所需的任何额外的参数的值。


参数:correction
The name of the edge correction to be used. The default  is "border" indicating the border correction. Other possibilities may include "Ripley", "isotropic", "translate" and "none", depending on the  interaction.  
要使用的边缘校正的名称。默认值是"border"指明边界修正。其他可能性包括"Ripley","isotropic","translate"和"none",根据上interaction。


参数:rbord
If correction = "border" this argument specifies the distance by which the window should be eroded for the border correction.  
如果correction = "border"这个参数指定的窗口应该被蚕食的边界校正的距离。


参数:use.gam
Logical flag; if TRUE then computations are performed using gam instead of glm.  
逻辑国旗;,如果TRUE然后计算进行使用gam,而不是glm,。


参数:method
The method used to fit the model. Options are  "mpl" for the method of Maximum PseudoLikelihood, and "ho" for the Huang-Ogata approximate maximum likelihood method.  
所采用的方法拟合模型。选项"mpl"方法的最大PseudoLikelihood,和"ho"黄绪方近似最大似然法。


参数:forcefit
Logical flag for internal use. If forcefit=FALSE, some trivial models will be fitted by a shortcut. If forcefit=TRUE, the generic fitting method will always be used.   
供内部使用的逻辑标志。如果forcefit=FALSE,一些琐碎的车型将配备的快捷方式。如果forcefit=TRUE,通用的拟合方法总是会被使用。


参数:project
Logical. Setting project=TRUE will ensure that the fitted model is always a valid point process by applying project.ppm.  
逻辑。设置project=TRUE将确保合适的模型应用project.ppm始终是一个有效的点过程。


参数:nd
Optional. Integer or pair of integers. The dimension of the grid of points (nd * nd or nd[1] * nd[2]) used to evaluate the integral in the pseudolikelihood.  
可选。整数或双整数。的网格点的尺寸(nd * nd或nd[1] * nd[2])用于评估在pseudolikelihood积分。


参数:gcontrol
Optional. List of parameters passed to glm.control (or passed to gam.control if use.gam=TRUE) controlling the model-fitting algorithm.   
可选。传递的参数列表glm.control(或传递给gam.control如果use.gam=TRUE)控制模型的拟合算法。


参数:nsim
Number of simulated realisations to generate (for method="ho")  
模拟实现数产生(为method="ho")


参数:nrmh
Number of Metropolis-Hastings iterations for each simulated realisation (for method="ho")  
大都市黑斯廷斯重复为每个模拟实现(为method="ho")


参数:start,control
Arguments passed to rmh controlling the behaviour of the Metropolis-Hastings algorithm (for method="ho")  
参数传递给rmh控制行为的Metropolis-Hastings算法(用于method="ho")


参数:verb
Logical flag indicating whether to print progress reports (for method="ho")  
逻辑标志,指示是否打印进度报告(为method="ho")


Details

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

This function fits a point process model to an observed point pattern. The model may include spatial trend, interpoint interaction, and dependence on covariates.
此功能适合点过程模型的观测点模式。该模型可以包括空间的趋势,INTERPOINT互动,依赖协变量。

In basic use, Q is a point pattern dataset (an object of class "ppp") to which we wish to fit a model.
基本使用,Q是一个点模式数据(一个类的对象"ppp"),这是我们要拟合模型。

The syntax of ppm() is closely analogous to the R functions glm and gam. The analogy is:
语法ppm()是类似于R功能glm和gam的。这个比喻是:

The point process model to be fitted is specified by the  arguments trend and interaction which are respectively analogous to the formula and family arguments of glm().
指定安装点过程模型的参数trend和interactionformula和family参数(GLM)分别类似于。

Systematic effects (spatial trend and/or dependence on  spatial covariates) are specified by the argument trend. This is an R formula object, which may be expressed in terms of the Cartesian coordinates x, y, the marks marks, or the variables in covariates (if supplied), or both. It specifies the logarithm of the first order potential of the process. The formula should not use any names beginning with .mpl as these are reserved for internal use. If trend is absent or equal to the default, ~1, then the model to be fitted is stationary (or at least, its first order  potential is constant).
系统的影响(空间的潮流和/或对空间协变量的依赖)所指定的参数trend。这是一个R公式对象,其可表示在笛卡尔坐标x,y,马克marks,或中的变量covariates(如果提供的条款) ,或两者。它指定的过程中的第一阶电位的对数。其计算公式不应该使用任何与.mpl开头的名字,因为这些保留供内部使用。如果trend是缺席或等于默认,~1,然后以嵌合的模式是固定的(或至少,它的第一阶电位是恒定的)。

Stochastic interactions between random points of the point process are defined by the argument interaction. This is an object of class "interact" which is initialised in a very similar way to the usage of family objects in glm and gam. The models currently available are: Poisson, AreaInter, BadGey, DiggleGatesStibbard, DiggleGratton, Fiksel, Geyer, Hardcore, LennardJones, MultiStrauss, MultiStraussHard, OrdThresh,  Ord, Pairwise, PairPiece, Saturated, SatPiece, Softcore, Strauss and  StraussHard. See the examples below.
随机点过程随机点之间的相互作用所定义的参数interaction。这是一个对象类"interact"这是在一个非常类似的方式来使用的家庭对象glm和gam初始化。目前可用的模型是:Poisson,AreaInter,BadGey,DiggleGatesStibbard,DiggleGratton,Fiksel,Geyer,Hardcore,LennardJones,MultiStrauss,MultiStraussHard,OrdThresh,Ord,Pairwise,PairPiece,Saturated ,SatPiece,Softcore,Strauss和StraussHard。请参见下面的例子。

If interaction is missing or NULL, then the model to be fitted has no interpoint interactions, that is, it is a Poisson process (stationary or nonstationary according to trend). In this case the method of maximum pseudolikelihood coincides with maximum likelihood.
如果interaction丢失或NULL,然后安装的模型没有INTERPOINT的相互作用,也就是说,它是一个泊松过程(固定的或根据trend)的非平稳。在这种情况下,具有最大似然的最大pseudolikelihood方法一致。

The fitted point process model returned by this function can be printed  (by the print method print.ppm) to inspect the fitted parameter values. If a nonparametric spatial trend was fitted, this can be extracted using the predict method predict.ppm.
这个函数返回的拟合点过程模型,可以打印(打印方法print.ppm)检查拟合的参数值。如果是安装了非参数空间的趋势,这可以提取使用的预测方法predict.ppm。

To fit a model involving spatial covariates other than the Cartesian coordinates x and y, the values of the covariates should be supplied in the argument covariates.  Note that it is not sufficient to have observed the covariate only at the points of the data point pattern;  the covariate must also have been observed at other  locations in the window.
要配合一个模型空间直角坐标系x和y,协变量的值,应提供的参数covariates以外的协变量。请注意,这是不足够观测到了协变量的数据点图案的点仅在协变量还必须已观察到在窗口中的其他地点。

Typically the argument covariates is a list, with names corresponding to variables in the trend formula. Each entry in the list is either a pixel image (giving the values of a spatial covariate at  a fine grid of locations), or a function (which can be evaluated at any location (x,y) to obtain the value of the spatial covariate), or a window (interpreted as a logical variable which is TRUE inside the window and FALSE outside it) or a single number (indicating a covariate that is constant in this dataset).  Each entry in the list must be an image (object of class "im", see im.object), or a function(x, y, ...), or a single number.   The software will look up the pixel values of each image at the required locations (quadrature points). In the case of a function(x, y, ...), the arguments x and y are implicit, and  any additional arguments ... should be given in covfunargs.
通常的说法covariates是一个列表,的名字trend公式中的变量相对应的。在列表中的每个条目可以是一个像素的图像(施与空间协变量的值的细网格的位置),或一个函数(其可以在任何位置(x,y),以获得空间协变量的值进行评估),或者解释为一个逻辑的变量,该变量是TRUE内的窗口和FALSE外面)的窗口(或单个数字(表示协变量,在这个数据集是恒定的)。列表中的每个条目必须是一个图像(类的对象"im",看到im.object),或function(x, y, ...),或一个单一的数字。该软件将查找每个图像的像素值在所需的位置(正交分)。在的情况下,一个function(x, y, ...),参数x和y是隐式的,任何额外的参数...应在covfunargs。

Note that, for covariate functions, only the name of the function appears in the trend formula. A covariate function is treated as if it were a single variable. The function arguments do not appear in the trend formula. See the Examples.
需要注意的是,协功能,只是名称的功能出现在趋势方程式。被视为是一个单一变量的协变量的函数。该函数的参数不会出现在趋势方程式。请参阅范例。

If covariates is a list, the list entries should have names corresponding to the names of covariates in the model formula trend. The variable names x, y and marks are reserved for the Cartesian  coordinates and the mark values, and these should not be used for variables in covariates.
如果covariates是一个列表,列表中的条目应该有相应的名字的协变量的模型公式trend的名称。的变量名x,y和marks被保留为笛卡尔坐标系的标记值,这些不应该被用于变量在covariates。

If covariates is a data frame, Q must be a quadrature scheme (see under Quadrature Schemes below). Then covariates must have as many rows as there are points in Q. The ith row of covariates should contain the values of spatial variables which have been observed at the ith point of Q.
如果covariates是一个数据框,Q必须是正交的计划(见下面根据正交计划)。 covariates必须有尽可能多的行还有点在Q。 ith行的covariates应含有空间变量的值,已经观察到在ith点Q。

In advanced use, Q may be a "quadrature scheme". This was originally just a technicality but it has turned out to have practical uses, as we explain below.
在高级的应用,Q可能是一个“积分计划”。这原本只是一个技术性问题,但它已被证明是有实际用途,因为我们在下面解释。

Quadrature schemes are required for our implementation of the method of maximum pseudolikelihood.  The definition of the pseudolikelihood involves an integral over the spatial window containing the data. In practice this integral must be approximated by a finite sum over a set of quadrature points. We use the technique of Baddeley and Turner (2000), a generalisation of the Berman-Turner (1992) device. In this technique the quadrature points for the numerical approximation include all the data points (points of the observed point pattern) as well as additional "dummy" points.
正交计划所需的我们实现的最大pseudolikelihood方法。的定义的pseudolikelihood涉及以上的空间的窗口,其中包含的数据的一个不可分割的。在实践中,这必须由一个有限的总和近似积分在一组的正交点。我们使用的技术巴德利和Turner(2000),伯曼 - 特纳(1992)设备的推广。在该技术中的数值近似正交点包括所有数据点的(观察到的点图案的点),以及额外的“虚设”点。

A quadrature scheme is an object of class "quad" (see quad.object) which specifies both the data point pattern and the dummy points for the quadrature scheme, as well as the quadrature weights associated with these points. If Q is simply a point pattern (of class "ppp", see ppp.object) then it is interpreted as specifying the data points only; a set of dummy points specified by default.dummy() is added, and the default weighting rule is invoked to compute the quadrature weights.
正交计划是类的一个对象"quad"(见quad.object)指定的数据点模式和用于正交方案,以及与这些点相关联的权重正交的伪点。如果Q是简单的点模式(类"ppp",看到ppp.object),那么它被解释为指定的数据点;指定的default.dummy()一个的假人点,被添加,和默认的加权规则被调用,以计算正交的权重。

Finer quadrature schemes (i.e. those with more dummy points) generally yield a better approximation, at the expense of higher computational load.
更精细的正交计划(即那些与更多的伪点)一般产生一个更好的近似,在更高的计算负荷的牺牲。

An easy way to fit models using a finer quadrature scheme is to let Q be the original point pattern data, and use the argument nd to determine the number of dummy points in the quadrature scheme.
一个简单的方法,以适应机型采用更精细的积分方案是让我们Q是原来的点模式数据,并使用参数nd哑点的数量来确定的正交计划。

Complete control over the quadrature scheme is possible. See quadscheme for an overview. Use quadscheme(X, D, method="dirichlet") to compute quadrature weights based on the Dirichlet tessellation, or quadscheme(X, D, method="grid") to compute quadrature weights by counting points in grid squares, where X and D are the patterns of data points and dummy points respectively. Alternatively use pixelquad to make a quadrature scheme with a dummy point at every pixel in a pixel image.
积分方案的完全控制是可能的。见quadscheme的概述。使用quadscheme(X, D, method="dirichlet")来计算积分的权重的基础上的Dirichlet镶嵌,或quadscheme(X, D, method="grid")来计算积分的权重方格计数点,其中X和D是模式的数据点和虚点。或者使用pixelquad作出一个虚拟的像素图像中的每个像素点的积分方案。

A practical advantage of quadrature schemes arises when we want to fit a model involving covariates (e.g. soil pH). Suppose we have only been able to observe the covariates at a small number of locations. Suppose cov.dat is a data frame containing the values of the covariates at the data points (i.e.\ cov.dat[i,] contains the observations for the ith data point) and cov.dum is another data frame (with the same columns as cov.dat) containing the covariate values at another set of points whose locations are given by the point pattern Y. Then setting Q = quadscheme(X,Y) combines the data points and dummy points into a quadrature scheme, and  covariates = rbind(cov.dat, cov.dum) combines the covariate data frames. We can then fit the model by calling ppm(Q, ..., covariates).
一种实用的优势正交计划时,我们要拟合模型协变量(如土壤pH值)。假设我们只在少数地方,能观察到的协变量。假设cov.dat是一个数据框包含的协变量的值的数据点(即\cov.dat[i,]包含观测的i个数据点)和cov.dum是另一个数据框(与相同的列cov.dat)含有协变量的值,在另一组的点,其位置由下式给出的点图案Y。然后设置Q = quadscheme(X,Y)相结合的数据点和虚点为一正交计划,和covariates = rbind(cov.dat, cov.dum)相结合的协变量的数据框。然后我们就可以通过调用ppm(Q, ..., covariates)拟合模型。

The model may be fitted either by the method of maximum pseudolikelihood (Besag, 1975) or by the approximate maximum likelihood method of Huang and Ogata (1999). Maximum pseudolikelihood is much faster, but has poorer statistical properties.
该模型可以通过安装在最大pseudolikelihood方法(Besag,1975),或近似的最大似然法(1999)黄绪方。最大pseudolikelihood是要快得多,但较差的统计特性。

In either case, the algorithm will begin by fitting the model by maximum pseudolikelihood. By default the algorithm returns the maximum pseudolikelihood fit.
在这两种情况下,该算法将装修模型的最大pseudolikelihood的开始。默认情况下的算法返回的最大pseudolikelihood,适合。

Maximum pseudolikelihood is equivalent to maximum likelihood for Poisson point processes.
,最大pseudolikelihood相当于泊松点过程的可能性最大。

Note that the method of maximum pseudolikelihood is believed to be inefficient and biased for point processes with strong interpoint interactions. In such cases, the Huang-Ogata approximate maximum likelihood method should be used, although maximum pseudolikelihood may also be used profitably for model selection in the initial phases of modelling.
请注意,最大pseudolikelihood方法被认为是低效和偏置点具有较强的INTERPOINT相互作用的过程。在这种情况下,黄绪方近似最大似然法,最大pseudolikelihood虽然也可能被用于盈利模型选择,模型的初始阶段。

If method="ho" then the model will be fitted using the Huang-Ogata (1999) approximate maximum likelihood method. First the model is fitted by maximum pseudolikelihood as described above, yielding an initial estimate of the parameter vector theta0. From this initial model, nsim simulated realisations are generated. The score and Fisher information of the model at theta=theta0 are estimated from the simulated realisations. Then one step of the Fisher scoring algorithm is taken, yielding an updated estimate theta1. The corresponding model is returned.
如果method="ho"那么该模型将安装使用黄绪方(1999)接近最大似然法。首先,模型嵌合最大pseudolikelihood如上所述,得到的初始估计的参数向量theta0。从最初的模型,nsim模拟实现。得分和Fisher信息的模式在theta=theta0估计从模拟实现。然后一步步的Fisher评分算法,产生一个更新的估计theta1。返回相应的模型。

Simulated realisations are generated using rmh. The iterative behaviour of the Metropolis-Hastings algorithm is controlled by the arguments start and control which are passed to rmh.
模拟实现使用rmh的。的Metropolis-Hastings算法的迭代行为的参数控制start和control传递给rmh。

As a shortcut, the argument nrmh determines the number of Metropolis-Hastings iterations run to produce one simulated realisation (if control is absent). Also if start is absent or equal to NULL, it defaults to list(n.start=N) where N is the number of points in the data point pattern.
作为一种快捷方式中,参数nrmh决定大都市黑斯廷斯运行的迭代产生一个模拟的实现(如果control是缺席)的数量。此外,如果start不存在或等于NULL,它默认为list(n.start=N)其中N是多少点的数据点模式。

Edge correction should be applied to the sufficient statistics of the model, to reduce bias. The argument correction is the name of an edge correction method. The default correction="border" specifies the border correction, in which the quadrature window (the domain of integration of the  pseudolikelihood) is obtained by trimming off a margin of width rbord from the observation window of the data pattern. Not all edge corrections are implemented (or implementable) for arbitrary windows. Other options depend on the argument interaction, but these generally include correction="periodic" (the periodic or toroidal edge correction in which opposite edges of a rectangular window are identified) and correction="translate" (the translation correction, see Baddeley 1998 and Baddeley and Turner 2000). For pairwise interaction models there is also Ripley's isotropic correction, identified by correction="isotropic" or "Ripley".
的边缘校正,应适用于该模型的充分统计量,以减少偏倚。参数correction是边缘校正方法的名称。默认的correction="border"指定的边框的校正,其中正交窗口(的域集成的pseudolikelihood),得到通过修整的余量宽度rbord从观察窗的数据模式。并非所有的边缘修正实施或实施的任意窗口。其他选项的参数取决于interaction,但这些程序通常包括correction="periodic"(定期或环形边缘校正的对面边缘的矩形窗口的确定)和correction="translate"(翻译校正,巴德利1998年和2000年Baddeley和特纳)。两两互动模式也有雷普利的各向同性修正,确定correction="isotropic"或"Ripley"。


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

An object of class "ppm" describing a fitted point process model.
对象的类"ppm"描述一个装有点过程模型。

See ppm.object for details of the format of this object and methods available for manipulating it.
见ppm.object的详细信息,这个对象的格式和方法可用于操纵它。


相互作用参数----------Interaction parameters----------

Apart from the Poisson model, every point process model fitted by ppm has parameters that determine the strength and range of "interaction" or dependence between points. These parameters are of two types:
除了泊松模型,每一个点过程模型拟合ppm参数确定的强度和范围的“互动”或点与点之间的依赖。这些参数有两种类型:

A parameter phi is called regular if the log likelihood is a linear function of theta where  theta = theta(psi) is some transformation of  psi. [Then theta is called the canonical parameter.]
的参数phi被称为正规的,如果对数似然是一个线性函数的theta其中theta = theta(psi)的psi是一些转型。 [然后theta被称为规范参数。

Other parameters are called irregular.
其它参数被称为不规则。

Typically, regular parameters determine the "strength" of the interaction, while irregular parameters determine the "range" of the interaction. For example, the Strauss process has a regular parameter gamma controlling the strength of interpoint inhibition, and an irregular parameter r determining the range of interaction.
通常情况下,常规参数确定的“力量”的互动,而不规则的参数决定了“范围”的互动。例如,施特劳斯过程具有定期参数gamma控制INTERPOINT抑制的强度,和一个不规则的参数r确定相互作用的范围内。

The ppm command is only designed to estimate regular parameters of the interaction. It requires the values of any irregular parameters of the interaction to be fixed. For example, to fit a Strauss process model to the cells dataset, you could type ppm(cells, ~1, Strauss(r=0.07)). Note that the value of the irregular parameter r must be given. The result of this command will be a fitted model in which the regular parameter gamma has been estimated.
ppm命令只设计了常规参数估计的互动。它需要的相互作用的任何不规则的参数的值被固定。例如,以适应施特劳斯过程模型的cells数据集,您可以键入ppm(cells, ~1, Strauss(r=0.07))。请注意,不规则参数r的值,必须给予。此命令的结果将是一个合适的模型中,常规参数gamma估计。

To determine the irregular parameters, there are several practical techniques, but no general statistical theory available. One useful technique is maximum profile pseudolikelihood, which is implemented in the command profilepl.   
要确定的不规则的参数,有几个实用的技术,但没有一般统计理论。一个有用的技术是的最大轮廓pseudolikelihood,这是实现在命令profilepl。


警告----------Warnings----------

The implementation of the Huang-Ogata method is experimental; several bugs were fixed in spatstat 1.19-0.
执行的黄绪方法是实验性的几个错误被固定在spatstat1.19-0。

See the comments above about the possible inefficiency and bias of the maximum pseudolikelihood estimator.
请参阅上述评论的可能效率低下和偏见的的最大pseudolikelihood估计。

The accuracy of the Berman-Turner approximation to the pseudolikelihood depends on the number of dummy points used in the quadrature scheme. The number of dummy points should  at least equal the number of data points.
的pseudolikelihood伯曼特纳近似的精度取决于正交计划中使用的虚设点的数目。哑点的数目应至少等于数据点的数目。

The parameter values of the fitted model do not necessarily determine a valid point process. Some of the point process models are only defined when the parameter values lie in a certain subset. For example the Strauss process only  exists when the interaction parameter gamma is less than or equal to 1, corresponding to a value of ppm()$theta[2] less than or equal to 0.
拟合模型的参数值不一定确定一个有效的点过程。一些点过程模型只定义时的参数值位于一个特定子集。例如施特劳斯过程时,只存在的相互作用参数gamma是小于或等于1,对应于一个值ppm()$theta[2]小于或等于0。

By default (if project=FALSE) the algorithm maximises the pseudolikelihood without constraining the parameters, and does not apply any checks for sanity after fitting the model. This is because the fitted parameter value could be useful information for data analysis. To constrain the parameters to ensure that the model is a valid point process, set project=TRUE. See also the functions valid.ppm and project.ppm.
默认情况下(如果project=FALSE)算法最大化pseudolikelihood,没有约束的参数,并不适用于任何理智的检查后拟合模型。这是因为拟合的参数值可能是有用的信息,对数据进行分析。 ,要限制参数,以确保该模型是一个有效的点过程中,设置project=TRUE。的功能valid.ppm和project.ppm。

The trend formula should not use any variable names beginning with the prefixes .mpl or Interaction as these names are reserved for internal use. The data frame covariates should have as many rows as there are points in Q. It should not contain variables called x, y or marks as these names are reserved for the Cartesian coordinates and the marks.
trend公式不应该使用任何变量名的前缀开始.mpl或Interaction因为这些名称是保留供内部使用。数据框covariates应该有尽可能多的行,还有点在Q。它不应该包含变量称为x,y或marks,因为这些名称将被保留在直角坐标系和标记。

If the model formula involves one of the functions poly(), bs() or ns() (e.g. applied to spatial coordinates x and y), the fitted coefficients can be misleading. The resulting fit is not to the raw spatial variates (x, x^2, x*y, etc.)  but to a transformation of these variates.  The transformation is implemented by poly() in order to achieve better numerical stability. However the resulting coefficients are appropriate for use with the transformed variates, not with the raw variates.   This affects the interpretation of the constant term in the fitted model, logbeta.  Conventionally, beta is the background intensity, i.e. the   value taken by the conditional intensity function when all predictors (including spatial or “trend” predictors) are set equal to 0. However the coefficient actually produced is the value that the log conditional intensity takes when all the predictors,  including the transformed spatial predictors, are set equal to 0, which is not the same thing.
如果模型公式中涉及到的功能之一poly(),bs()或ns()(例如,适用于空间坐标x和y),拟合系数可以误导。由此产生的配合是不是原始的空间分布随机数(x,x^2,x*y,等),但这些变元的转型。的转化是通过poly()以达到更好的数值稳定性。然而,得到的系数用于转换的变元是适当的,与原始的变元。这会影响拟合模型中的常数项的解释,logbeta。以往,beta是背景强度,即所有的预测因子(包括空间或“潮流”的预测因子)时所采取的条件强度函数的值被设置等于0。然而,实际产生的系数的值的log有条件强度的需要时,所有的预测,包括变换空间的预测,等于0,这是不一样的东西。

Worse still, the result of predict.ppm can be completely wrong if the trend formula contains one of the functions poly(), bs() or ns(). This is a weakness of the underlying function predict.glm.
更糟糕的是,predict.ppm可以是完全错误的,如果这种趋势的公式包含的功能之一poly(),bs()或ns()。这是一种软弱的基本功能predict.glm。

If you wish to fit a polynomial trend,  we offer an alternative to poly(), namely polynom(), which avoids the difficulty induced by transformations.  It is completely analogous to poly except that it does not orthonormalise. The resulting coefficient estimates then have their natural interpretation and can be predicted correctly.  Numerical stability may be compromised.
如果你想安装一个多项式趋势,我们提供了一个替代poly(),即polynom(),从而避免了变换引起的困难。它是完全类似于poly除外,它并没有orthonormalise。得到的系数估计有其自然的解释,可以准确的预测。数值稳定性可能会受到影响。

Values of the maximised pseudolikelihood are not comparable if they have been obtained with different values of rbord.
是没有可比性的,如果他们已获得不同的值rbord的最大化pseudolikelihood的值。


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

Practical maximum pseudolikelihood for spatial point patterns. Australian and New Zealand Journal of Statistics 42 (2000) 283&ndash;322.
Approximating point process likelihoods with GLIM. Applied Statistics 41 (1992) 31&ndash;38.
Statistical analysis of non-lattice data. The Statistician 24 (1975) 179-195.
Tanemura, M. On parameter estimation for pairwise interaction processes. International Statistical Review 62 (1994) 99-117.
Improvements of the maximum pseudo-likelihood estimators in various spatial statistical models. Journal of Computational and Graphical Statistics 8 (1999) 510-530.
Pseudolikelihood for exponential family models of spatial point processes. Annals of Applied Probability 1 (1991) 445&ndash;461.
On asymptotic normality of pseudo likelihood estimates for pairwise interaction processes, Annals of the Institute of Statistical Mathematics 46 (1994) 475-486.

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

ppm.object for details of how to print, plot and manipulate a fitted model.
ppm.object如何打印的详细信息,策划和操纵拟合模型。

ppp and quadscheme for constructing data.
ppp和quadscheme构建数据。

Interactions:  Poisson, AreaInter, BadGey, DiggleGatesStibbard, DiggleGratton, Geyer, Fiksel, Hardcore, LennardJones, MultiStrauss, MultiStraussHard, OrdThresh,  Ord, Pairwise, PairPiece, Saturated, SatPiece, Softcore, Strauss and  StraussHard.
相互作用:Poisson,AreaInter,BadGey,DiggleGatesStibbard,DiggleGratton,Geyer,Fiksel,Hardcore LennardJones,MultiStrauss,MultiStraussHard,OrdThresh,Ord,Pairwise,PairPiece,Saturated,SatPiece,Softcore,Strauss和StraussHard。

See profilepl for advice on fitting nuisance parameters in the interaction, and ippm for irregular parameters in the trend.
见profilepl建议配件滋扰参数的互动,和ippm的为不规则参数的趋势。

See valid.ppm and project.ppm for ensuring the fitted model is a valid point process.
valid.ppm和project.ppm,以确保合适的模型是一个有效的点过程。


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


data(nztrees)
ppm(nztrees)
# fit the stationary Poisson process[适合平稳泊松过程]
# to point pattern 'nztrees'[点模式“nztrees”]

## Not run: [#不运行:]
Q <- quadscheme(nztrees)
ppm(Q)
# equivalent.[相同的。]

## End(Not run)[#(不执行)]

ppm(nztrees, nd=128)

fit1 <- ppm(nztrees, ~ x)
# fit the nonstationary Poisson process [适合非平稳泊松过程]
# with intensity function lambda(x,y) = exp(a + bx)[与强度函数λ(X,Y)= exp(A + BX)]
# where x,y are the Cartesian coordinates[其中x,y是笛卡尔坐标]
# and a,b are parameters to be estimated[且a,b是要估计的参数]

fit1
coef(fit1)
coef(summary(fit1))

ppm(nztrees, ~ polynom(x,2))
# fit the nonstationary Poisson process [适合非平稳泊松过程]
# with intensity function lambda(x,y) = exp(a + bx + cx^2)[与强度函数λ(X,Y)= exp(A + BX + CX ^ 2)]

## Not run: [#不运行:]
library(splines)
ppm(nztrees, ~ bs(x,df=3))

## End(Not run)[#(不执行)]
#       WARNING: do not use predict.ppm() on this result[警告:不要使用这个结果predict.ppm()]
# Fits the nonstationary Poisson process [适用于非平稳泊松过程]
# with intensity function lambda(x,y) = exp(B(x))[强度函数λ(X,Y)= exp(B(X))]
# where B is a B-spline with df = 3[其中,B是用df = 3的B-样条]

ppm(nztrees, ~1, Strauss(r=10), rbord=10)
# Fit the stationary Strauss process with interaction range r=10[适合固定施特劳斯过程的相互作用范围R = 10]
# using the border method with margin rbord=10[利用边界的方法提供保证金rbord = 10]

ppm(nztrees, ~ x, Strauss(13), correction="periodic")
# Fit the nonstationary Strauss process with interaction range r=13[适合非平稳施特劳斯与互动范围R = 13]
# and exp(first order potential) =  activity = beta(x,y) = exp(a+bx)[和exp(一阶电位)=活动=β(X,Y)= exp(A + BX)]
# using the periodic correction.[使用周期的校正。]

# Huang-Ogata fit:[黄绪方适合:]
## Not run: ppm(nztrees, ~1, Strauss(r=10), method="ho")[#不运行:PPM(nztrees~1,施特劳斯(R = 10),方法=“豪”)]



# COVARIATES[协变量]
#[]
X <- rpoispp(42)
weirdfunction <- function(x,y){ 10 * x^2 + 5 * sin(10 * y) }
#[]
# (a) covariate values as function[(一)作为函数的协变量值]
ppm(X, ~ y + Z, covariates=list(Z=weirdfunction))
#[]
# (b) covariate values in pixel image[(二)协变量值的像素的图像]
Zimage <- as.im(weirdfunction, unit.square())
ppm(X, ~ y + Z, covariates=list(Z=Zimage))
#[]
# (c) covariate values in data frame[(三)数据框的协变量值]
Q <- quadscheme(X)
xQ <- x.quad(Q)
yQ <- y.quad(Q)
Zvalues <- weirdfunction(xQ,yQ)
ppm(Q, ~ y + Z, covariates=data.frame(Z=Zvalues))
# Note Q not X[注意:Q不是X]

# COVARIATE FUNCTION WITH EXTRA ARGUMENTS[协变量函数的额外的参数]
#[]
f <- function(x,y,a){ y - a }
ppm(X, ~x + f, covariates=list(f=f), covfunargs=list(a=1/2))

## MULTITYPE POINT PROCESSES ### [####多类型的点过程]
data(lansing)
# Multitype point pattern --- trees marked by species[多类型的点模式---树木标记的物种]


# fit stationary marked Poisson process[适合固定显着的泊松过程]
# with different intensity for each species[每个物种的不同强度]
## Not run: ppm(lansing, ~ marks, Poisson())[#不运行:PPM(蓝星,~标记,泊松())]


# fit nonstationary marked Poisson process[适合非平稳标记的泊松过程]
# with different log-cubic trend for each species[每个物种不同的log立方的趋势]
## Not run: ppm(lansing, ~ marks * polynom(x,y,3), Poisson())[#运行:PPM(兰辛,~*标记的多项式(X,Y,3),泊松())]



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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-16 08:17 , Processed in 0.026279 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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