rNeymanScott(spatstat)
rNeymanScott()所属R语言包:spatstat
Simulate Neyman-Scott Process
模拟的奈曼 - 斯科特过程
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Generate a random point pattern, a realisation of the Neyman-Scott cluster process.
生成一个随机点模式,实现了的奈曼 - 斯科特聚类的过程。
用法----------Usage----------
rNeymanScott(kappa, rmax, rcluster, win = owin(c(0,1),c(0,1)), ..., lmax=NULL)
参数----------Arguments----------
参数:kappa
Intensity of the Poisson process of cluster centres. A single positive number, a function, or a pixel image.
聚类中心的泊松过程的强度。一个单一的正数,函数,或像素图像。
参数:rmax
Maximum radius of a random cluster.
一个随机整群的最大半径。
参数:rcluster
A function which generates random clusters, or other data specifying the random cluster mechanism. See Details.
生成的随机簇,或指定随机整群机制的其他数据的功能。查看详细信息。
参数:win
Window in which to simulate the pattern. An object of class "owin" or something acceptable to as.owin.
在模拟模式的窗口。类的一个对象"owin"或接受的as.owin的东西。
参数:...
Arguments passed to rcluster
参数传递给rcluster
参数:lmax
Optional. Upper bound on the values of kappa when kappa is a function or pixel image.
可选。上限的值kappakappa是一个函数或像素的图像。
Details
详细信息----------Details----------
This algorithm generates a realisation of the general Neyman-Scott process, with the cluster mechanism given by the function rcluster. The clusters must have a finite maximum possible radius rmax.
该算法生成一个实现一般的奈曼 - 斯科特过程,聚类机制的功能rcluster。聚类必须有一个有限的最大可能半径rmax。
First, the algorithm generates a Poisson point process of “parent” points with intensity kappa. Here kappa may be a single positive number, a function kappa(x, y), or a pixel image object of class "im" (see im.object). See rpoispp for details.
首先,该算法产生的泊松点过程中的“父”点与强度kappa。这里kappa可能是一个正数,函数kappa(x, y),或类的对象的像素的图像"im"(参见im.object)。见rpoispp的详细信息。
Second, each parent point is replaced by a random cluster of points. These clusters are combined together to yield a single point pattern which is then returned as the result of rNeymanScott.
其次,每个父点替换由一个随机聚类的点。这些簇结合在一起,产生一个单一的点图案,然后返回结果rNeymanScott。
The argument rcluster specifies the cluster mechanism. It may be either:
参数rcluster指定的聚类机制。它可以是:
A function which will be called to generate each random cluster (the offspring points of each parent point). The function should expect to be called in the form rcluster(x0,y0,...) for a parent point at a location (x0,y0). The return value of rcluster should specify the coordinates of the points in the cluster; it may be a list containing elements x,y, or a point pattern (object of class "ppp"). If it is a marked point pattern then the result of rNeymanScott will be a marked point pattern.
Afunction会被调用来生成每个随机整群的后代(点每个母公司点)。该函数应该期望被调用的形式rcluster(x0,y0,...)父点的位置(x0,y0)的。 rcluster的返回值应指定在聚类中的点的坐标,它可能是一个列表,其中包含的元素x,y,或点模式(类的对象"ppp")。如果它是一个标记点模式,然后rNeymanScott将是一个显着的点模式的结果。
A list(mu, f) where mu specifies the mean number of offspring points in each cluster, and f generates the random displacements (vectors pointing from the parent to the offspring). In this case, the number of offspring in a cluster is assumed to have a Poisson distribution, implying that the Neyman-Scott process is also a Cox process. The first element mu should be either a single nonnegative number (interpreted as the mean of the Poisson distribution of cluster size) or a pixel image or a function(x,y) giving a spatially varying mean cluster size (interpreted in the sense of Waagepetersen, 2007). The second element f should be a function that will be called once in the form f(n) to generate n independent and identically distributed displacement vectors (i.e. as if there were a cluster of size n with a parent at the origin (0,0)). The function should return a point pattern (object of class "ppp") or something acceptable to xy.coords that specifies the coordinates of n points.
Alist(mu, f)其中mu指定的后代点的平均人数在每个聚类,f生成随机的位移向量指向从父的后代。聚类中的后代的数量,在这种情况下,假定有一个泊松分布,这意味着的奈曼斯科特过程也是一个Cox过程。的第一个元素mu应该是一个非负数(解释为泊松分布的聚类大小的平均值)或像素图像或function(x,y)提供空间上变化的平均簇的大小(在解释感的Waagepetersen,2007年)。第二个元素f应该是一个函数,该函数将被调用一次的形式f(n)生成n独立同分布的位移矢量(即,如果有一个簇的大小n与父母的起源(0,0))。函数返回一个点模式(类的对象"ppp")或者其他可接受的xy.coords指定n点的坐标。
If required, the intermediate stages of the simulation (the parents and the individual clusters) can also be extracted from the return value of rNeymanScott through the attributes "parents" and "parentid". The attribute "parents" is the point pattern of parent points. The attribute "parentid" is an integer vector specifying the parent for each of the points in the simulated pattern.
如果需要的话,还可以模拟的中间阶段(父母和个别聚类)被提取从rNeymanScott通过属性"parents"和"parentid"的返回值。属性"parents"是母公司点的点模式。属性"parentid"是一个整数矢量指定为每个模拟的图案中的点的父。
值----------Value----------
The simulated point pattern (an object of class "ppp").
的模拟点模式(类的一个对象"ppp"“)。
Additionally, some intermediate results of the simulation are returned as attributes of this point pattern: see Details.
此外,一些中间的模拟结果返回作为这点图案的属性:请参阅详细。
(作者)----------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----------
A statistical approach to problems of cosmology. Journal of the Royal Statistical Society, Series B 20, 1–43.
An estimating function approach to inference for inhomogeneous Neyman-Scott processes. Biometrics 63, 252–258.
参见----------See Also----------
rpoispp, rThomas, rGaussPoisson, rMatClust, rCauchy, rVarGamma
rpoispp,rThomas,rGaussPoisson,rMatClust,rCauchy,rVarGamma
实例----------Examples----------
# each cluster consist of 10 points in a disc of radius 0.2[每个聚类由10个点组成的,在光盘的半径0.2]
nclust <- function(x0, y0, radius, n) {
return(runifdisc(n, radius, centre=c(x0, y0)))
}
plot(rNeymanScott(10, 0.2, nclust, radius=0.2, n=5))
# multitype Neyman-Scott process (each cluster is a multitype process)[多类型的奈曼 - 斯科特过程(每个聚类是一个多类型的过程)]
nclust2 <- function(x0, y0, radius, n, types=c("a", "b")) {
X <- runifdisc(n, radius, centre=c(x0, y0))
M <- sample(types, n, replace=TRUE)
marks(X) <- M
return(X)
}
plot(rNeymanScott(15,0.1,nclust2, radius=0.1, n=5))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|