rmhcontrol(spatstat)
rmhcontrol()所属R语言包:spatstat
Set Control Parameters for Metropolis-Hastings Algorithm.
大都市黑斯廷斯算法控制参数设置。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Sets up a list of parameters controlling the iterative behaviour of the Metropolis-Hastings algorithm.
设置了参数控制的Metropolis-Hastings算法的迭代行为。
用法----------Usage----------
rmhcontrol(...)
## Default S3 method:
rmhcontrol(..., p=0.9, q=0.5, nrep=5e5,
expand=NULL, periodic=NULL, ptypes=NULL,
x.cond=NULL, fixall=FALSE, nverb=0)
参数----------Arguments----------
参数:...
Arguments passed to methods.
传递参数的方法。
参数:p
Probability of proposing a shift (as against a birth/death).
提出的转变(如对一个出生/死亡)的概率。
参数:q
Conditional probability of proposing a death given that a birth or death will be proposed.
提出的死亡,出生或死亡提出的条件概率。
参数:nrep
Total number of steps (proposals) of Metropolis-Hastings algorithm that should be run.
步骤(建议)都市Hastings算法应该运行的总数。
参数:expand
Simulation window or expansion rule. Either a window (object of class "owin") or a numerical expansion factor, specifying that simulations are to be performed in a domain other than the original data window, then clipped to the original data window. This argument is passed to rmhexpand. A numerical expansion factor can be in several formats: see rmhexpand.
的模拟窗口或扩展规则。无论一个窗口(对象类"owin")或数值扩展系数,指定模拟中要执行的域以外的“原始数据”窗口,然后裁剪成原始数据窗口。这个参数被传递给rmhexpand。膨胀系数的数值可以在几种不同的格式:请参阅rmhexpand。
参数:periodic
Logical value (or NULL) indicating whether to simulate “periodically”, i.e. identifying opposite edges of the rectangular simulation window. A NULL value means “undecided.”
逻辑值(或NULL)表示是否模拟“定期”,即确定模拟矩形窗口的相对边缘。 ANULL这个值的意思是“未定”。
参数:ptypes
For multitype point processes, the distribution of the mark attached to a new random point (when a birth is proposed)
下的多点过程,附加到一个新的随机点(出生时提出的标志分布)
参数:x.cond
Conditioning points for conditional simulation.
条件模拟的调节点。
参数:fixall
(Logical) for multitype point processes, whether to fix the number of points of each type.
(逻辑)进行多点过程中,是否要修复的每种类型的点的数目。
参数:nverb
Progress reports will be printed every nverb iterations
进度报告将打印每nverb迭代
Details
详细信息----------Details----------
The Metropolis-Hastings algorithm, implemented as rmh, generates simulated realisations of point process models. The function rmhcontrol sets up a list of parameters which control the iterative behaviour and termination of the Metropolis-Hastings algorithm, for use in a subsequent call to rmh. It also checks that the parameters are valid.
的Metropolis-Hastings算法,实现为rmh,产生的点过程模型的模拟实现。函数rmhcontrol设置列表中的参数控制的Metropolis-Hastings算法的迭代行为和终止,在后续调用rmh使用。它还检查的参数是有效的。
(A separate function rmhstart determines the initial state of the algorithm, and rmhmodel determines the model to be simulated.)
(一个单独的函数rmhstart的算法确定初始状态,和rmhmodel决定模型是模拟)。
The parameters are as follows:
参数如下:
p The probability of proposing a “shift” (as opposed to a birth or death) in the Metropolis-Hastings algorithm.
P提出的“转变”(而不是出生或死亡)的Metropolis-Hastings算法的概率。
If p = 1 then the algorithm only alters existing points, so the number of points never changes, i.e. we are simulating conditionally upon the number of points. The number of points is determined by the initial state (specified by rmhstart).
如果p = 1然后,算法只改变现有的点,所以点的数量没有变化,也就是说,我们所模拟的条件后点的数量。点的数量是由初始状态(指定rmhstart)。
If p=1 and fixall=TRUE and the model is a multitype point process model, then the algorithm only shifts the locations of existing points and does not alter their marks (types). This is equivalent to simulating conditionally upon the number of points of each type. These numbers are again specified by the initial state.
如果p=1和fixall=TRUE和模型是一个多类型,然后点过程模型,算法只移动现有点的位置,并不会改变他们的分数(类型)。这是相当于模拟有条件每种类型的点的数目时。这些号码被再次指定的初始状态的。
If p = 1 then no expansion of the simulation window is allowed (see expand below).
如果p = 1然后是允许的(没有扩展的模拟窗口看到expand下面)。
The default value of p can be changed by setting the parameter rmh.p in spatstat.options.
设置的参数p中rmh.pspatstat.options的默认值是可以改变的。
q The conditional probability of proposing a death (rather than a birth) given that a shift is not proposed. This is of course ignored if p is equal to 1.
Q的条件提出的死亡(而不是出生),不建议转变的可能性。当然,这是忽略p等于1。
The default value of q can be changed by setting the parameter rmh.q in spatstat.options.
设置的参数q中rmh.qspatstat.options的默认值是可以改变的。
nrep The number of repetitions or iterations to be made by the Metropolis-Hastings algorithm. It should be large.
NREP的Metropolis-Hastings算法的重复或迭代的数量。它应该是大的。
The default value of nrep can be changed by setting the parameter rmh.nrep in spatstat.options.
设置的参数nrep中rmh.nrepspatstat.options的默认值是可以改变的。
Either a number or a window (object of class "owin"). Indicates that the process is to be simulated on a domain other than the original data window w, then clipped to w when the algorithm has finished. This would often be done in order to approximate the simulation of a stationary process (Geyer, 1999) or more generally a process existing in the whole plane, rather than just in the window w.
一个数字或一个窗口(类的对象"owin"“)。表示该进程是一个域比原来的数据窗口上进行模拟w,然后夹到w时,该算法已完成。这往往会做,以近似模拟一个固定的过程(赫耶尔,1999)或更一般地在整个平面上存在的过程,而不是仅仅在窗口中的w。
If expand is a window object, it is taken as the larger domain in which simulation is performed.
如果expand是一个窗口对象,它被当作更大的领域中,进行模拟。
If expand is numeric, it is interpreted as an expansion factor or expansion distance for determining the simulation domain from the data window. It should be a named scalar, such as expand=c(area=2), expand=c(distance=0.1), expand=c(length=1.2). See rmhexpand() for more details. If the name is omitted, it defaults to area.
如果expand是数字,它被解释为确定模拟区域的数据窗口的膨胀系数或扩展距离。这应该是一个名为标,如expand=c(area=2),expand=c(distance=0.1),expand=c(length=1.2)。见rmhexpand()更多详情。如果省略名称,它默认为area的。
Expansion is not permitted if the number of points has been fixed by setting p = 1 or if the starting configuration has been specified via the argument x.start in rmhstart.
扩展是不允许的,如果通过设置p = 1或已被指定通过启动配置参数x.startrmhstart点的数量已固定。
If expand is NULL, this is interpreted to mean “not yet decided”. An expansion rule will be determined at a later stage, using appropriate defaults. See rmhexpand.
如果expand是NULL,这可以解释为“尚未决定”。扩展的规则将在稍后阶段决定的,使用适当的默认值。见rmhexpand。
periodic A logical value (or NULL) determining whether to simulate “periodically”. If periodic is TRUE, and if the simulation window is a rectangle, then the simulation algorithm effectively identifies opposite edges of the rectangle. Points near the right-hand edge of the rectangle are deemed to be close to points near the left-hand edge. Periodic simulation usually gives a better approximation to a stationary point process. For periodic simulation, the simulation window must be a rectangle. (The simulation window is determined by expand as described above.)
定期逻辑值(或NULL)确定是否“定期”模拟。如果periodicTRUE,如果模拟窗口是一个矩形,然后模拟算法有效地识别的矩形的相对边缘。的矩形的右侧边缘附近的点被认为是接近的点的左侧边缘附近。定期的模拟提供了更好的近似固定点的过程。对于周期性的模拟,仿真窗口必须是一个矩形。 (仿真窗口是由expand如上所述。)
The value NULL means "undecided". The decision is postponed until rmh is called. Depending on the point process model to be simulated, rmh will then set periodic=TRUE if the simulation window is expanded and the expanded simulation window is rectangular; otherwise periodic=FALSE.
值NULL的意思是“未定”。决定推迟到rmh被称为。点过程模型是模拟,rmh然后设置periodic=TRUE,如果模拟窗口扩大和扩展的模拟窗口是矩形的,否则periodic=FALSE。
Note that periodic=TRUE is only permitted when the simulation window (i.e. the expanded window) is rectangular.
请注意,periodic=TRUE时,只允许仿真窗口(即扩展窗口)是矩形的。
ptypes A vector of probabilities (summing to 1) to be used in assigning a random type to a new point. Defaults to a vector each of whose entries is 1/nt where nt is the number of types for the process. Convergence of the simulation algorithm should be improved if ptypes is close to the relative frequencies of the types which will result from the simulation.
ptypes中要使用随机类型分配到一个新点的概率(求和1)的向量。默认为一个向量,其项是1/nt其中nt是多少类型的过程。应改善的模拟算法的收敛性如果ptypes是接近的类型的相对频率,这将导致从仿真。
If this argument is given, then conditional simulation will be performed, and x.cond specifies the location of the fixed points as well as the type of conditioning. It should be either a point pattern (object of class "ppp") or a list(x,y) or a data.frame. See the section on Conditional Simulation.
如果此参数,然后将条件模拟,和x.cond指定的固定点的位置以及类型的调节。它应该是一个点模式(类"ppp")或list(x,y)或data.frame对象。请参阅条件模拟。
fixall A logical scalar specifying whether to condition on the number of points of each type. Meaningful only if a marked process is being simulated, and if p = 1. A warning message is given if fixall is set equal to TRUE when it is not meaningful.
fixall的逻辑标量,对每种类型的数目的点指定是否条件。才有意义,如果有明显的过程是模拟的,如果p = 1。给出一条警告消息,如果fixall设置为TRUE时,它是没有意义的。
nverb An integer specifying how often “progress reports” (which consist simply of the number of repetitions completed) should be printed out. If nverb is left at 0, the default, the simulation proceeds silently.
nverb一个整数,指定多久“进展报告”(包括简单的重复完成的数量)被打印出来。 ,如果nverb离开为0,默认情况下,模拟进行提示。
值----------Value----------
An object of class "rmhcontrol", which is essentially a list of parameter values for the algorithm.
一个对象类"rmhcontrol",它实质上是一个列表的参数值的算法。
There is a print method for this class, which prints a sensible description of the parameters chosen.
有一个print这个类的方法,它会输出一个明智的选择的参数说明。
条件模拟----------Conditional Simulation----------
For a Gibbs point process X, the Metropolis-Hastings algorithm easily accommodates several kinds of conditional simulation:
一个Gibbs点过程X“的Metropolis-Hastings算法很容易适应条件模拟的几种:
We fix the total number of points N(X) to be equal to n. We simulate from the conditional distribution of X given N(X) = n.
我们固定点的总数N(X)等于n。我们模拟的条件分布X给定的N(X) = n。
In a multitype point process, where Y[[j]] denotes the process of points of type j, we fix the number N(Y[[j]]) of points of type j to be equal to n[j], for j=1,2,...,m. We simulate from the conditional distribution of X given N(Y[[j]]) = n[j] for j=1,2,...,m.
在一个多类型点的过程中,Y[[j]]j,我们解决数N(Y[[j]])点类型的j<X等于表示的过程中,分型>,n[j]。我们模拟的条件分布j=1,2,...,m给XN(Y[[j]]) = n[j]。
We require that the point process X should, within a specified sub-window V, coincide with a specified point pattern y. We simulate from the conditional distribution of X given (X intersect V) = y.
我们要求点过程X应在指定的子窗口V,与一个指定的点模式y。我们模拟的条件分布X给定的(X intersect V) = y。
We require that the point process X include a specified list of points y. We simulate from the point process with probability density g(x) = c * f(x union y) where f is the probability density of the original process X, and c is a normalising constant.
我们需要的点过程X点y包括指定的列表。我们模拟的点过程的概率密度g(x) = c * f(x union y)其中f是原工艺的概率密度X和c是归一化常数。
To achieve each of these types of conditioning we do as follows:
为了实现这些类型的空调,我们做如下:
Set p=1. The number of points is determined by the initial state of the simulation: see rmhstart.
设置p=1。的点的数量是由模拟的初始状态:见rmhstart。
Set p=1 and fixall=TRUE. The number of points of each type is determined by the initial state of the simulation: see rmhstart.
设置p=1和fixall=TRUE。在每种类型的点的数量来确定的初始状态下的仿真:见rmhstart。
Set x.cond to be a point pattern (object of class "ppp"). Its window V=x.cond$window becomes the conditioning subwindow V.
设置x.cond是一个点模式(类的对象"ppp")。它的窗口V=x.cond$window成为空调子窗口V。
Set x.cond to be a list(x,y) or data.frame with two columns containing the coordinates of the points, or a list(x,y,marks) or data.frame with three columns containing the coordinates and marks of the points.
设置x.cond是list(x,y)或data.frame有两列包含的坐标点,或一个list(x,y,marks)或data.frame三列的坐标和标志点。
The arguments x.cond, p and fixall can be combined.
的参数x.cond,p和fixall可以结合起来。
(作者)----------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----------
Likelihood Inference for Spatial Point Processes. Chapter 3 in O.E. Barndorff-Nielsen, W.S. Kendall and M.N.M. Van Lieshout (eds) Stochastic Geometry: Likelihood and Computation, Chapman and Hall / CRC, Monographs on Statistics and Applied Probability, number 80. Pages 79–140.
参见----------See Also----------
rmh, rmhmodel, rmhstart, rmhexpand, spatstat.options
rmh,rmhmodel,rmhstart,rmhexpand,spatstat.options
实例----------Examples----------
# parameters given as named arguments[作为命名的参数给出的参数]
c1 <- rmhcontrol(p=0.3,periodic=TRUE,nrep=1e6,nverb=1e5)
# parameters given as a list[作为一个列表中给出的参数]
liz <- list(p=0.9, nrep=1e4)
c2 <- rmhcontrol(liz)
# parameters given in rmhcontrol object[rmhcontrol对象中的参数]
c3 <- rmhcontrol(c1)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|