Learn R Programming

NScluster (version 1.2.0)

SimulateThomas: Simulation of the Thomas Model

Description

Simulation of the Thomas model.

Usage

SimulateThomas(pars, seed = NULL, plot = TRUE)

Arguments

pars

a named vector of containing the values of the model parameters (mu, nu, sigma), where mu is an intensity of parents, nu is an expected number of descendants for each parent and sigma is a parameter of the dispersal kernel.

seed

a positive integer, which is the seed for a sequence of uniform random numbers. The default seed is based on the current time.

plot

logical. If TRUE (default), simulated parent points and offspring points are plotted.

Value

parents

a list containing two components named "n" and "xy" giving the number and the matrix of (x,y) coordinates of simulated parents points respectively.

offspring

a list containing two components named "n" and "xy" giving the number and the matrix of (x,y) coordinates of simulated offspring points respectively.

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)}.$$

Each of the offspring coordinates \((x_j^i, y_j^i)\) is given like that of SimulateIP.

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
# NOT RUN {
pars <- c(mu = 50.0, nu = 30.0, sigma = 0.03)
SimulateThomas(pars, seed = 117)
# }

Run the code above in your browser using DataLab