Learn R Programming

NScluster (version 1.1.0)

SimulateTypeA: Simulation of the Generalized Thomas Model of Type A

Description

Simulation of the Generalized Thomas Model of Type A.

Usage

SimulateTypeA(seeds, pa, ty=1, pmax=100, omax=3000, plot=TRUE)

Arguments

seeds
the three positive integer variables, which are initial seeds for a sequence of uniform random numbers.
pa
the parameter values $(mu, nu, a, sigma_1, sigma_2)$ for the random variable Poisson.
ty
the variable $Ty$ for the standardized coordinates of points in the rectangular region $[0,1]*[0,Ty]$ without loss of generality except for the scaling.
pmax
maximum number of parent points.
omax
maximum number of offspring points.
plot
logical. If TRUE (default) simulated parent points and offspring points are plotted.

Value

Details

Parents' configuration and numbers of the offspring cluster sizes are generated by the same way as the Thomas model.

Let random variable $U_k, k=1,2$ be independently and uniformly distributed in [0,1]. Then $r$ satisfies as follows:

$$r = \sigma_1 \sqrt{-2 \log(1-U_1)}, \; U_2 \le a,$$ $$r = \sigma_2 \sqrt{-2 \log(1-U_1)}, \; otherwise.$$

Then, by the isotropy condition, for $i = 1,2,...,Poisson(mu)$, coordinate of the offspring points $(x_j^i, y_j^i), j=1,2,...,Poisson(nu)$ is given for each $i=1,...,Poisson(mu)$,

$$x_j^i = x_i^p + r \cos(2 \pi U),$$ $$y_j^i = y_i^p + r \sin(2 \pi U),$$

using series of different uniform random numbers ${U_1, U_2, U}$ for different $i$ and $j$.

References

U. Tanaka, Y. Ogata and K. Katsura, Simulation and estimation of the Neyman-Scott type spatial cluster models, Computer Science Monographs No.34, 2008, 1-44. The Institute of Statistical Mathematics.

Examples

Run this code
  seeds <- c(822, 913, 905)
  mu <- 50;  nu <- 30;  a <- 0.3;  sig1 <- 0.005;  sig2 <- 0.1
  SimulateTypeA(seeds, c(mu,nu,a,sig1,sig2), pmax=100, omax=150)

Run the code above in your browser using DataLab