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

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

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

                                        Simulation Envelopes of Summary Function
                                         简易功能的仿真信封

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

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

Computes simulation envelopes of a summary function.
计算的汇总函数的模拟信封。


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


  envelope(Y, fun, ...)

  ## S3 method for class 'ppp'
envelope(Y, fun=Kest, nsim=99, nrank=1, ...,
  simulate=NULL, verbose=TRUE, clipdata=TRUE,
  transform=NULL, global=FALSE, ginterval=NULL,
  savefuns=FALSE, savepatterns=FALSE,
  nsim2=nsim, VARIANCE=FALSE, nSD=2, Yname=NULL, maxnerr=nsim)

  ## S3 method for class 'ppm'
envelope(Y, fun=Kest, nsim=99, nrank=1, ...,
  simulate=NULL, verbose=TRUE, clipdata=TRUE,
  start=NULL, control=update(default.rmhcontrol(Y), nrep=nrep), nrep=1e5,
  transform=NULL, global=FALSE, ginterval=NULL,
  savefuns=FALSE, savepatterns=FALSE,
  nsim2=nsim, VARIANCE=FALSE, nSD=2, Yname=NULL, maxnerr=nsim)

  ## S3 method for class 'kppm'
envelope(Y, fun=Kest, nsim=99, nrank=1, ...,
  simulate=NULL, verbose=TRUE, clipdata=TRUE,
  transform=NULL, global=FALSE, ginterval=NULL,
  savefuns=FALSE, savepatterns=FALSE,
  nsim2=nsim, VARIANCE=FALSE, nSD=2, Yname=NULL, maxnerr=nsim)



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

参数:Y
Object containing point pattern data. A point pattern (object of class "ppp") or a fitted point process model (object of class "ppm" or "kppm").  
对象包含点的图形数据。点模式(类的对象"ppp")或拟合点过程模型(类的对象"ppm"或"kppm")。


参数:fun
Function that computes the desired summary statistic for a point pattern.   
函数,计算所需的摘要统计的点模式。


参数:nsim
Number of simulated point patterns to be generated when computing the envelopes.  
数量计算的信封时,要产生的模拟点图案。


参数:nrank
Integer. Rank of the envelope value amongst the nsim simulated values. A rank of 1 means that the minimum and maximum simulated values will be used.  
整数。包络值之间的nsim模拟值的排名。 1表示A级的最小和最大的值将被用于模拟。


参数:...
Extra arguments passed to fun.  
额外的参数传递给fun。


参数:simulate
Optional. Specifies how to generate the simulated point patterns. If simulate is an expression in the R language, then this expression will be evaluated nsim times, to obtain nsim point patterns which are taken as the simulated patterns from which the envelopes are computed. If simulate is a list of point patterns, then the entries in this list will be treated as the simulated patterns from which the envelopes are computed. Alternatively simulate may be an object produced by the envelope command: see Details.  
可选。指定如何生成模拟模式。如果simulate是的R语言表达的,那么这个表达式将被评估nsim倍,获得nsim点模式,并以此作为计算模拟模式的信封。如果simulate是一个点模式,然后在此列表中的条目将被视为模拟计算模式的信封。或者simulate可能是一个对象所产生的envelope命令:查看详细信息。


参数:verbose
Logical flag indicating whether to print progress reports during the simulations.  
逻辑标志,指示是否打印在模拟的进度报告。


参数:clipdata
Logical flag indicating whether the data point pattern should be clipped to the same window as the simulated patterns, before the summary function for the data is computed. This should usually be TRUE to ensure that the data and simulations are properly comparable.  
逻辑指示标志的数据点模式是否应该被裁剪的同一个窗口模拟模式,之前的数据的汇总函数的计算方法。通常,这应该是TRUE,以确保数据和模拟是正确的比较。


参数:start,control
Optional. These specify the arguments start and control of rmh, giving complete control over the simulation algorithm. Applicable only when Y is a fitted model of class "ppm".  
可选。这些指定的参数start和controlrmh,提供完整的控制算法的仿真。只适用于当Y类"ppm"是一个合适的模型。


参数:nrep
Number of iterations in the Metropolis-Hastings simulation algorithm. Applicable only when Y is a fitted model of class "ppm".  
在大都市黑斯廷斯模拟算法的迭代数。只适用于当Y类"ppm"是一个合适的模型。


参数:transform
Optional. A transformation to be applied to the function values, before the envelopes are computed. An expression object (see Details).  
可选。一种变换被应用到的函数值,计算之前的信封。表达式对象(见详情)。


参数:global
Logical flag indicating whether envelopes should be pointwise (global=FALSE) or simultaneous (global=TRUE).  
逻辑标志,指示是否信封应该是逐点(global=FALSE)或同步(global=TRUE“)。


参数:ginterval
Optional. A vector of length 2 specifying the interval of r values for the simultaneous critical envelopes. Only relevant if global=TRUE.  
可选。一个向量长度为2r值,同时关键的信封指定的时间间隔。只有相关的,如果global=TRUE。


参数:savefuns
Logical flag indicating whether to save all the simulated function values.  
逻辑标志,指示是否保存所有的模拟函数值。


参数:savepatterns
Logical flag indicating whether to save all the simulated point patterns.  
逻辑标志,指示是否保存所有的模拟点模式。


参数:nsim2
Number of extra simulated point patterns to be generated if it is necessary to use simulation to estimate the theoretical mean of the summary function. Only relevant when global=TRUE and the simulations are not based on CSR.  
额外的模拟生成的点图案,如果它是必要的使用模拟来估计的汇总函数的理论平均数目。只有相关的,当global=TRUE和模拟不根据企业社会责任。


参数:VARIANCE
Logical. If TRUE, critical envelopes will be calculated as sample mean plus or minus nSD times sample standard deviation.  
逻辑。如果TRUE,关键信封将被计算样本均值加上或减去nSD倍样本标准偏差。


参数:nSD
Number of estimated standard deviations used to determine the critical envelopes, if VARIANCE=TRUE.  
数估计的标准偏差,以确定关键的信封,如果VARIANCE=TRUE。


参数:Yname
Character string that should be used as the name of the  data point pattern Y when printing or plotting the results.  
应使用的字符的字符串,作为数据点图案Y的名称当打印或绘制的结果。


参数:maxnerr
Maximum number of rejected patterns. If fun yields an error when applied to a simulated point pattern (for example, because the pattern is empty and fun requires at least one point), the pattern will be rejected and a new random point pattern will be generated. If this happens more than maxnerr times, the algorithm will give up.  
拒绝模式的最大数量。如果fun产生一个错误,当一个模拟模式(例如,因为该模式是空的,fun要求至少有一个点),该模式将被拒绝和一个新的随机点模式被产生。如果发生这种情况maxnerr倍以上,该算法会放弃。


Details

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

The envelope command performs simulations and computes envelopes of a summary statistic based on the simulations. The result is an object that can be plotted to display the envelopes. The envelopes can be used to assess the goodness-of-fit of a point process model to point pattern data.
envelope命令进行模拟和计算的摘要统计的基础上模拟的信封。结果是一个对象,它可以绘制显示的信封。可用于评估适合的点过程模型点模式数据善良的信封。

For the most basic use, if you have a point pattern X and you want to test Complete Spatial Randomness (CSR), type plot(envelope(X, Kest,nsim=39)) to see the K function for X plotted together with the envelopes of the K function for 39 simulations of CSR.
对于最基本的使用,如果你有一个点模式X,你要测试的完整的空间随机性(CSR),请键入“plot(envelope(X, Kest,nsim=39))K功能X一起图K39企业社会责任的模拟功能的信封。

The envelope function is generic, with methods for the classes "ppp", "ppm" and "kppm" described here. There is also a method for the class "pp3" which is described separately as envelope.pp3.
envelope函数的类的方法是通用的,"ppp","ppm"和"kppm"这里描述。还设有一个为类方法"pp3",单独描述envelope.pp3。

To create simulation envelopes, the command envelope(Y, ...)  first generates nsim random point patterns in one of the following ways.
要创建模拟的信封,命令envelope(Y, ...)第一次产生nsim的随机点模式通过以下方式之一。

If Y is a point pattern (an object of class "ppp") and simulate=NULL, then we generate nsim simulations of Complete Spatial Randomness (i.e. nsim simulated point patterns each being a realisation of the uniform Poisson point process) with the same intensity as the pattern Y. (If Y is a multitype point pattern, then the simulated patterns are also given independent random marks; the probability distribution of the random marks is determined by the relative frequencies of marks in Y.)
如果Y是一个点模式(类的一个对象"ppp")和simulate=NULL,然后我们生成nsim模拟完整的空间随机性(即nsim模拟点图案是一个实现统一的泊松点过程)模式Y具有相同的强度。 (如果Y是一个多类型的点模式,然后在模拟模式也给独立的随机商标;的概率分布的随机标记是由马克Y的相对频率)。

If Y is a fitted point process model (an object of class "ppm" or "kppm") and simulate=NULL, then this routine generates nsim simulated realisations of that model.
如果Y是一个装有点过程模型(对象类"ppm"或"kppm")simulate=NULL,那么这个程序产生nsim该模型的模拟实现。

If simulate is supplied, then it determines how the simulated point patterns are generated. It may be either
如果simulate提供,然后决定如何生成模拟模式。它可以是

an expression in the R language, typically containing a call to a random generator. This expression will be evaluated nsim times to yield nsim point patterns. For example if simulate=expression(runifpoint(100)) then each simulated pattern consists of exactly 100 independent uniform random points.
R语言的表达式中,通常含有的呼叫到一个随机数发生器。这个表达式将被评估nsim次,得到nsim点模式。例如,如果simulate=expression(runifpoint(100))然后每个模拟模式由100个独立均匀分布的随机点。

a list of point patterns. The entries in this list will be taken as the simulated patterns.
点模式的列表。在此列表中的条目将被视为模拟模式。

an object of class "envelope". This should have been produced by calling envelope with the argument savepatterns=TRUE. The simulated point patterns that were saved in this object will be extracted and used as the simulated patterns for the new envelope computation. This makes it possible to plot envelopes for two different summary functions based on exactly the same set of simulated point patterns.
对象类"envelope"。这本来是通过调用envelope的说法savepatterns=TRUE。被保存在此对象的模拟点图案将被提取并作为新的包络线计算的模拟模式。这使得有可能完全相同的一组模拟的点模式的基础上为两个不同的汇总函数绘制信封。

The summary statistic fun is applied to each of these simulated patterns. Typically fun is one of the functions Kest, Gest, Fest, Jest, pcf, Kcross, Kdot, Gcross, Gdot, Jcross, Jdot, Kmulti, Gmulti, Jmulti or Kinhom. It may also be a character string containing the name of one of these functions.
摘要统计fun被施加到这些模拟模式中的每一个。通常fun的功能之一Kest,Gest,Fest,Jest,pcf,Kcross,<X >,Kdot,Gcross,Gdot,Jcross,Jdot,Kmulti,Gmulti或Jmulti 。它也可以是含有这些功能之一的名称的字符串。

The statistic fun can also be a user-supplied function; if so, then it must have arguments X and r like those in the functions listed above, and it must return an object of class "fv".
的统计fun也可以是一个用户提供的函数,如果是的话,那么它必须有X和r在上面列出的函数一样,它必须返回一个对象的参数类"fv"。

Upper and lower critical envelopes are computed in one of the following ways:
上部和下部的关键信封计算通过以下方式中的一个:




pointwise: by default, envelopes are calculated pointwise (i.e. for each value of the distance argument r), by sorting the nsim simulated values, and taking the m-th lowest and m-th highest values, where m = nrank. For example if nrank=1, the upper and lower envelopes are the pointwise maximum and minimum of the simulated values.
逐点:默认情况下,信封计算逐点(即每个值的距离参数r),,通过排序nsim模拟值,并考虑m个最低和X>个最高值,其中m。例如,如果m = nrank,上部包络线和下包络线的逐点的模拟值中的最大值和最小值。

The pointwise envelopes are not &ldquo;confidence bands&rdquo; for the true value of the function! Rather, they specify the critical points for a Monte Carlo test (Ripley, 1981). The test is constructed by choosing a fixed value of r, and rejecting the null hypothesis if the observed function value lies outside the envelope at this value of r. This test has exact significance level alpha = 2 * nrank/(1 + nsim).
逐点信封是不是“的信心带”的真正价值的功能!相反,它们指定一个蒙特卡洛测试(雷普利,1981)的临界点。该测试是通过选择一个固定值r,和拒绝的无效假设,如果所观察到的功能的价值在于外信封,在这个值的r构造。这个测试有确切的显着性水平alpha = 2 * nrank/(1 + nsim)。




simultaneous: if global=TRUE, then the envelopes are determined as follows. First we calculate the theoretical mean value of the summary statistic (if we are testing CSR, the theoretical value is supplied by fun; otherwise we perform a separate set of nsim2 simulations, compute the average of all these simulated values, and take this average as an estimate of the theoretical mean value). Then, for each simulation, we compare the simulated curve to the theoretical curve, and compute the maximum absolute difference between them (over the interval of r values specified by ginterval). This gives a deviation value d[i] for each of the nsim simulations. Finally we take the m-th largest of the deviation values, where m=nrank, and call this dcrit. Then the simultaneous envelopes are of the form lo = expected - dcrit and hi = expected + dcrit where expected is either the theoretical mean value theo (if we are testing CSR) or the estimated theoretical value mmean (if we are testing another model). The simultaneous critical envelopes have constant width 2 * dcrit.
同时如果global=TRUE,然后将信封确定如下。首先,我们计算的理论平均值的汇总统计量(如果我们正在测试的企业社会责任,理论值是由fun,否则,我们执行一组独立的nsim2模拟,计算平均所有这些模拟值,并借此平均估计的理论平均值)。然后,对于每个模拟,我们比较了模拟曲线的理论曲线,并计算出最大绝对差异(在区间r值指定的ginterval)。这给出了一个偏差值d[i]为每个nsim模拟。最后,我们采取个最大的偏差值,m,并调用这个m=nrank的dcrit。同时信封的形式为lo = expected - dcrit和hi = expected + dcrit其中expected是理论平均值theo(如果我们正在测试CSR)或估计理论值mmean(如果我们正在测试另一种模式)。同时关键的信封有固定宽度的2 * dcrit。

The simultaneous critical envelopes allow us to perform a different Monte Carlo test (Ripley, 1981). The test rejects the null hypothesis if the graph of the observed function lies outside the envelope at any value of r. This test has exact significance level alpha = nrank/(1 + nsim).
同时关键的信封,让我们来执行不同的蒙特卡罗试验(里普利,1981)。检验拒绝零假设,如果所观察到的函数的曲线图中位于外面的包络在任何值r。这个测试有确切的显着性水平alpha = nrank/(1 + nsim)。

This test can also be performed using mad.test.
此测试也可以执行使用mad.test。




based on sample moments: if VARIANCE=TRUE, the algorithm calculates the (pointwise) sample mean and sample variance of the simulated functions. Then the envelopes are computed as mean plus or minus nSD standard deviations. These envelopes do not have an exact significance interpretation. They are a naive approximation to the critical points of the Neyman-Pearson test assuming the summary statistic is approximately Normally distributed.
根据样本矩:如果VARIANCE=TRUE,该算法计算(逐点)样本均值和样本方差的模拟功能。然后计算平均值加上或减去nSD标准偏差的信封。这些信封没有一个确切的意义的解释。他们是天真的近似的临界点,奈曼 - 皮尔逊测试假设的汇总统计近似正态分布。

The return value is an object of class "fv" containing the summary function for the data point pattern, the upper and lower simulation envelopes, and  the theoretical expected value (exact or estimated) of the summary function  for the model being tested. It can be plotted using plot.envelope.
返回值是一个对象类"fv"包含的数据点模式的汇总函数,上部和下部的模拟信封,与理论预期值(准确或估计)的汇总函数模型正在测试。它可以绘制使用plot.envelope。

If VARIANCE=TRUE then the return value also includes the sample mean, sample variance and other quantities.
如果VARIANCE=TRUE,则返回值还包括样本均值,样本方差,数量及其他。

Arguments can be passed to the function fun through .... This makes it possible to select the edge correction used to calculate the summary statistic. See the Examples. Selecting only a single edge correction will make the code run much faster.
参数可以传递给函数的fun通过...。这使得能够选择用于计算摘要统计的边缘校正。请参阅范例。选择只有一个边缘校正,使代码运行得更快。

If Y is a fitted cluster point process model (object of class "kppm"), and simulate=NULL, then the model is simulated directly using simulate.kppm.
如果Y是一个装有聚点过程模型(类的对象"kppm"),和simulate=NULL,则该模型是直接模拟simulate.kppm。

If Y is a fitted Gibbs point process model (object of class "ppm"), and simulate=NULL, then the model is simulated by running the Metropolis-Hastings algorithm rmh. Complete control over this algorithm is provided by the  arguments start and control which are passed to rmh.
如果Y是一个装有吉布斯点过程模型(类的对象"ppm"),和simulate=NULL,则该模型是模拟运行大都市“黑斯廷斯算法rmh。该算法的完全控制参数提供start和control传递给rmh。

For simultaneous critical envelopes (global=TRUE) the following options are also useful:
同时关键的信封(global=TRUE)以下选项也非常有用:




ginterval determines the interval of r values over which the deviation between curves is calculated. It should be a numeric vector of length 2. There is a sensible default (namely, the recommended plotting interval for fun(X), or the range of r values if r is explicitly specified).
ginterval的r曲线之间的偏差来计算的值确定的时间间隔。它应该是一个数值向量的长度为2。有一个合理的默认值(即,推荐的绘图fun(X)的时间间隔,或r值的范围r如果显式指定)。




transform specifies a transformation of the summary function fun that will be carried out before the deviations are computed. It must be an expression object using the symbol . to represent the function value. For example,  the conventional way to normalise the K function (Ripley, 1981) is to transform it to the L function L(r) = sqrt(K(r)/pi) and this is implemented by setting transform=expression(sqrt(./pi)). Such transforms are only useful if global=TRUE.
transform的汇总函数指定一个转型fun,将之前进行的计算偏差。它必须是一个表达式对象,使用符号.代表的函数值。例如,标准化K功能(里普利,1981)的传统方式是把它的L函数L(r) = sqrt(K(r)/pi),这是实施,通过设置transform=expression(sqrt(./pi))。这样的转换是有用的,如果global=TRUE。

It is also possible to extract the summary functions for each of the individual simulated point patterns, by setting savefuns=TRUE. Then the return value also  has an attribute "simfuns" containing all the  summary functions for the individual simulated patterns. It is an "fv" object containing functions named sim1, sim2, ... representing the nsim summary functions.
另外,也可以提取的简要功能对于每个个别模拟点图案,通过设置savefuns=TRUE。然后,返回值也有一个属性"simfuns"包含了所有的个人模拟模式的汇总函数。这是一个"fv"对象,其中包含名为sim1, sim2, ...代表nsim汇总函数的功能。

It is also possible to save the simulated point patterns themselves, by setting savepatterns=TRUE. Then the return value also has an attribute "simpatterns" which is a list of length nsim containing all the simulated point patterns.
另外,也可以保存模拟点图案本身,通过设置savepatterns=TRUE。则返回值也有一个属性"simpatterns"长度nsim包含所有模拟的点图案是一个列表。

See plot.envelope and plot.fv for information about how to plot the envelopes.
见plot.envelope和plot.fv的信息,有关如何绘制的信封。

Different envelopes can be recomputed from the same data using envelope.envelope. Envelopes can be combined using pool.envelope.
不同的信封可以使用相同的数据envelope.envelope重新计算。信封可以结合使用pool.envelope。


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

An object of class "fv", see fv.object, which can be printed and plotted directly.
类的一个对象"fv",fv.object,可以直接打印和绘制。

Essentially a data frame containing columns
本质上是一个数据框包含多个列


参数:r
the vector of values of the argument r  at which the summary function fun has been  estimated  
矢量参数的值r的汇总函数fun已经估计


参数:obs
values of the summary function for the data point pattern  
值的汇总函数的数据点模式


参数:lo
lower envelope of simulations  
下包络线的模拟


参数:hi
upper envelope of simulations  
上包络线的模拟

and either
,要么


参数:theo
theoretical value of the summary function under CSR (Complete Spatial Randomness, a uniform Poisson point process) if the simulations were generated according to CSR  
如果根据CSR模拟理论值的汇总函数根据CSR(完整的空间的随机性,统一的泊松点过程)


参数:mmean
estimated theoretical value of the summary function, computed by averaging simulated values,  if the simulations were not generated according to CSR.  
估计理论值的汇总函数,计算出平均模拟值,不会产生根据CSR模拟。

Additionally, if savepatterns=TRUE, the return value has an attribute "simpatterns" which is a list containing the nsim simulated patterns. If savefuns=TRUE, the return value has an attribute "simfuns" which is an object of class "fv" containing the summary functions computed for each of the nsim simulated patterns.
此外,如果savepatterns=TRUE,返回值有一个属性"simpatterns"这是一个列表,其中包含的nsim模拟模式。如果savefuns=TRUE,返回值有一个属性"simfuns"这是一个类的对象"fv"的nsim模拟模式计算的汇总函数。


错误和警告----------Errors and warnings----------

An error may be generated if one of the simulations produces a point pattern that is empty, or is otherwise unacceptable to the function fun.
如果一个模拟产生一个点的模式,是空的,或因其他原因不能接受的功能fun,可能会产生错误。

The upper envelope may be NA (plotted as plus or minus infinity) if some of the function values computed for the simulated point patterns are NA. Whether this occurs will depend on the function fun, but it usually happens when the simulated point pattern does not contain enough points to compute a meaningful value.
上包络线可能是NA(图中为正或负无穷大)的函数值的计算模拟模式NA。无论发生这种情况,将取决于在功能上fun,但它通常发生在模拟模式不包含足够的点来计算一个有意义的值。


置信区间----------Confidence intervals----------

Simulation envelopes do not compute confidence intervals; they generate significance bands.  If you really need a confidence interval for the true mean of the data pattern, use varblock.
模拟信封没有计算置信区间;它们产生意义频段。如果你真的需要真实均值的置信区间的数据模式,使用varblock。


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

John Wiley and Sons, 1991.
Arnold, 2003.
Spatial statistics. John Wiley and Sons.
Cambridge University Press, 1988.
Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons.

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

clf.test, mad.test for envelope-based tests.
clf.test,mad.test信封为基础的测试。

fv.object, plot.envelope, plot.fv, envelope.envelope, pool.envelope for handling envelopes.
fv.object,plot.envelope,plot.fv,envelope.envelope,pool.envelope处理的信封。

Kest, Gest, Fest, Jest, pcf, ppp, ppm, default.expand
Kest,Gest,Fest,Jest,pcf,ppp,ppm,default.expand


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


data(simdat)
X <- simdat

# Envelope of K function under CSR[K函数包络下的企业社会责任]
## Not run: [#不运行:]
plot(envelope(X))

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


# Translation edge correction (this is also FASTER):[翻译的边缘校正(这也快):]
## Not run: [#不运行:]
plot(envelope(X, correction="translate"))

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


# Envelope of K function for simulations from Gibbs model [信封的K函数吉布斯模型模拟]
data(cells)
fit <- ppm(cells, ~1, Strauss(0.05))
## Not run: [#不运行:]
plot(envelope(fit))
plot(envelope(fit), global=TRUE)

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


# Envelope of K function for simulations from cluster model [信封的K函数模拟聚类模式]
data(redwood)
fit <- kppm(redwood, ~1, "Thomas")
## Not run: [#不运行:]
plot(envelope(fit, Gest))
plot(envelope(fit, Gest, global=TRUE))

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


# Envelope of G function under CSR[信封的G功能下的企业社会责任]
## Not run: [#不运行:]
plot(envelope(X, Gest))

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


# Envelope of L function under CSR[信封的L功能下的企业社会责任]
#  L(r) = sqrt(K(r)/pi)[L(R)= SQRT(/ PI K(R))]
## Not run: [#不运行:]
  E <- envelope(X, Kest)
  plot(E, sqrt(./pi) ~ r)

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


# Simultaneous critical envelope for L function[同时关键的信封L功能]
# (alternatively, use Lest)[(或者,使用唯恐)]
## Not run: [#不运行:]
  plot(envelope(X, Kest, transform=expression(sqrt(./pi)), global=TRUE))

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


# How to pass arguments needed to compute the summary functions:[如何来传递参数需要计算的汇总函数:]
# We want envelopes for Jcross(X, "A", "B") [我们希望信封Jcross(X,“A”,“B”)]
# where "A" and "B" are types of points in the dataset 'demopat'[其中“A”和“B”类型的点数据集“demopat]

data(demopat)
## Not run: [#不运行:]
plot(envelope(demopat, Jcross, i="A", j="B"))

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


# Use of `simulate'[使用的模拟]
## Not run: [#不运行:]
plot(envelope(cells, Gest, simulate=expression(runifpoint(42))))
plot(envelope(cells, Gest, simulate=expression(rMaternI(100,0.02))))

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


# Envelope under random toroidal shifts[围护结构随机环形的变化]
data(amacrine)
## Not run: [#不运行:]
plot(envelope(amacrine, Kcross, i="on", j="off",
               simulate=expression(rshift(amacrine, radius=0.25))))

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

# Envelope under random shifts with erosion[围护结构随机变化与侵蚀]
## Not run: [#不运行:]
plot(envelope(amacrine, Kcross, i="on", j="off",
              simulate=expression(rshift(amacrine, radius=0.1, edge="erode"))))

## End(Not run)[#(不执行)]
  
# Envelope of INHOMOGENEOUS K-function with fitted trend[信封的非均质K-函数的拟合趋势]
## Not run: [#不运行:]
trend <- density.ppp(X, 1.5)
plot(envelope(X, Kinhom, lambda=trend,
         simulate=expression(rpoispp(trend))))

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

# Precomputed list of point patterns[预计算点模式]
X <- rpoispp(30)
PatList <- list()
for(i in 1:19) PatList[[i]] <- runifpoint(npoints(X))
E <- envelope(X, Kest, nsim=19, simulate=PatList)
if(interactive()) plot(E)

# re-using the same point patterns[重新使用相同的点图案]
EK <- envelope(X, Kest, nsim=10, savepatterns=TRUE)
EG <- envelope(X, Kest, nsim=10, simulate=EK)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-13 20:08 , Processed in 0.032852 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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