Learn R Programming

NScluster (version 1.1.0)

SimulateThomas: Simulation of the Thomas Model

Description

Simulation of the Thomas Model.

Usage

SimulateThomas(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, sigma)$.
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

Let random variable $U$ be independently and uniformly distributed in [0,1]. We put

$$U = \int_0^r q_\sigma(t)dt = 1 - \exp \left( -\frac{r^2}{2\sigma^2} \right).$$

Then we have

$$r = \sigma \sqrt{-2 \log(1-U)}.$$

Let $(x_i^p, y_i^p), i=1,2,..., I$ be a coordinate of each parent point where the integer $I$ is generated from the Poisson random variable $Poisson(mu)$ with mean $\mu$ from now on. Then, for each $i$, the number of offspring $J_i$ is generated by the random variable $Poisson(nu)$ with mean $nu$. Then, using series of different uniform random numbers ${U}$ for different $i$ and $j$, the offspring coordinates $(x_j^i, y_j^i), j=1,2,...,J_i$ is given by

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

owing to the isotropy condition of the distribution.

Given a positive number $\nu$ and let a sequence of a random variable ${U_k}$ be independently and uniformly distributed in [0,1], the Poisson random number $M$ is the smallest integer such that

$$\sum_{k=1}^{M+1} - \log U_k > \nu,$$

where $log$ represents natural logarithm.

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;  sig <- 0.03
  SimulateThomas(seeds, c(mu,nu,sig))

Run the code above in your browser using DataLab