Learn R Programming

NScluster (version 1.1.0)

SimulateTypeC: Simulation of the Generalized Thomas Model of Type C

Description

Simulation of the Generalized Thomas Model of Type C.

Usage

SimulateTypeC(seeds, pa1, pa2, 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.
pa1
the parameter values $(mu_1, nu_1, sigma_1)$ for the random variable Poisson.
pa2
the parameter values $(mu_2, nu_2, 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

Consider the two type of the Thomas model with parameters $(mu_1, nu_1, sigma_1)$ and $(mu_2, nu_2, sigma_2)$. Parents' configuration and numbers of the offspring cluster sizes are generated by the two types of uniformly distributed parents $(x_i^k, x_i^k)$ with $i=1,2,...,Poisson(mu_k)$ for k=1,2, respectively.

Then, using series of different uniform random numbers ${U}$ for different $i$ and $j$, the offspring coordinates $(x_j^{k,i}, y_j^{k,i}), j=1,2,...,Poisson(nu_k)$ of the parents $(k,i)$ with $k=1,2$ is given by

$$x_j^{k,i} = x_i^k + r_k \cos(2 \pi U),$$ $$y_j^{k,i} = y_i^k + r_k \sin(2 \pi U),$$

where

$$r_k = \sigma_k \sqrt{-2 \log(1-U_k)}, \; k=1,2,$$

with different random numbers ${U_k, U}$ for different $k,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)
  mu1 <- 5;  nu1 <- 30;  sig1 <- 0.01 
  mu2 <- 9;  nu2 <- 150;  sig2 <- 0.05
  SimulateTypeC(seeds, c(mu1,nu1,sig1), c(mu2,nu2,sig2), pmax=200, omax=300)

Run the code above in your browser using DataLab