sim.cppm: Simulation for Neyman-Scott Cluster Point Process Models and...

View source: R/simulate.R

sim.cppmR Documentation

Simulation for Neyman-Scott Cluster Point Process Models and Their Extensions

Description

Simulation for the Thomas and Inverse-power type models, and the extended Thomas models of type A, B, and C.

Usage

sim.cppm(model = "Thomas", pars, seed = NULL)

## S3 method for class 'sim.cpp'
print(x, ...)
## S3 method for class 'sim.cpp'
plot(x, parents.distinct = FALSE, ...)

Arguments

model

a character string indicating each cluster point process model: "Thomas", "IP", "TypeA", "TypeB", and "TypeC".

pars

a named vector giving the values of each parameter. See 'Details'.

seed

arbitrary positive integer to generate a sequence of uniform random numbers. The default seed is based on the current time.

x

an object of class "sim.cpp".

parents.distinct

logical. If TRUE, simulated points are distinguished by two groups specified by parameters. (Only valid if model = "TypeB" or "TypeC".)

...

further graphical parameters from par for plot or ignored for print.

Details

We consider the five cluster point process models: the Thomas and Inverse-power type models, and the extended Thomas models of type A, B, and C.

  • "Thomas" (Thomas model)

    The parameters of the model are as follows:

    • mu: the intensity of parent points.

    • nu: the expectation of a random number of descendant points of each parent point.

    • sigma: the parameter set of the dispersal kernel.

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

    Consider

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

    where r is the random variable of the distance between each parent point and the descendant points associated with the given parent. The distance is distributed independently and identically according to the dispersal kernel.

    We have

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

    Let (x_i^p, y_i^p), i=1,2,\dots, 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, each of the offspring coordinates (x_j^i, y_j^i), j=1,2,\dots,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.

  • "IP" (Inverse-power type model)

    The parameters of the model are as follows:

    • mu: the intensity of parent points.

    • nu: the expectation of a random number of descendant points of each parent point.

    • p, c: the set of parameters of the dispersal kernel, where p > 1 and c > 0.

    Let U be as above.

    For all r \ge 0,

    Q_{p,c}(r) := \int_0^r q_{p,c}(t)dt

    = c^{p-1}(p-1) \frac{(r+c)^{1-p} - c^{1-p}}{1-p}

    = 1 - c^{p-1} (r+c)^{1-p}.

    Here, we put Q_{p,c}(r) = U. From this, we have

    r = c\{(1-U)^{1/(1-p)} - 1\}.

    The parent points and their descendant points are generated the same as the Thomas model.

  • "TypeA" (Type A model)

    The parameters of the model are as follows:

    • mu: the intensity of parent points.

    • nu: the expectation of a random number of descendant points of each parent point.

    • a, sigma1, sigma2: the set of parameters of the dispersal kernel, where where a is a mixture ratio parameter with 0 < a < 1.

    Let each 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)}, \quad U_2 \le a ,

    r = \sigma_2 \sqrt{-2 \log(1-U_1)}, \quad \mathrm{otherwise.}

    The parent points and their descendant points are generated the same as the Thomas model.

  • "TypeB" (Type B model)

    The TypeB is a superposed Thomas model. The parameters of the model are as follows:

    • mu1, mu2: the corresponding intensity of parent points of each Thomas model.

    • nu: the expectation of a random number of descendant points of each parent point.

    • sigma1, sigma2: the corresponding set of parameters of the dispersal kernel of each Thomas model.

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

    Then, using series of different uniform random numbers \{U\} for different i and j, each of the descendant coordinates (x_j^{k,i}, y_j^{k,i}) of the parents (x_i^k, y_i^k), k=1,2, j=1,2,\dots,Poisson(\nu), 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)}, \quad k = 1, 2,

    with different random numbers \{U_k, U\} for different k, i, and j.

  • "TypeC" (Type C model)

    The TypeC is a superposed Thomas model. The parameters of the model are as follows:

    • mu1, mu2: the corresponding intensity of parent points of each Thomas model.

    • nu1, nu2: the corresponding expectation of a random number of descendant points of each Thomas model.

    • sigma1, sigma2: the corresponding set of parameters of the dispersal kernel of each Thomas model.

    The parent points and their descendant points are generated the same as the Type B model.

Value

sim.cppm returns an object of class "sim.cpp" containing the following components which has print and plot methods.

parents

a list containing two components named "n" and "xy", which are the number and the matrix of (x,y) coordinates of simulated parent points, respectively. For "TypeB", xy [1:n[1], 1:2] and the remainder are generated from (mu1, nu, sigma1) and (mu2, nu, sigma2), respectively. For "TypeC", xy[1:n[1], 1:2] and the remainder are generated from (mu1, nu1, sigma1) and (mu2, nu2, sigma2), respectively.

offspring

a list containing two components named "n" and "xy", which are the number and the matrix of (x,y) coordinates of simulated descendant points, respectively. For "TypeB", xy [1:n[1], 1:2] and the remainder are generated from (mu1, nu, sigma1) and (mu2, nu, sigma2), respectively. For "TypeC", xy[1:n[1], 1:2] and the remainder are generated from (mu1, nu1, sigma1) and (mu2, nu2, sigma2), respectively.

References

Tanaka, U., Ogata, Y. and Katsura, K. (2008) Simulation and estimation of the Neyman-Scott type spatial cluster models. Computer Science Monographs 34, 1-44. The Institute of Statistical Mathematics, Tokyo. https://www.ism.ac.jp/editsec/csm/.

Examples

## Thomas Model
pars <- c(mu = 50.0, nu = 30.0, sigma = 0.03)
t.sim <- sim.cppm("Thomas", pars, seed = 117)
t.sim
plot(t.sim)

## Inverse-Power Type Model
pars <- c(mu = 50.0, nu = 30.0, p = 1.5, c = 0.005)
ip.sim <- sim.cppm("IP", pars, seed = 353)
ip.sim
plot(ip.sim)

## Type A Model
pars <- c(mu = 50.0, nu = 30.0, a = 0.3, sigma1 = 0.005, sigma2 = 0.1)
a.sim <- sim.cppm("TypeA", pars, seed = 575)
a.sim
plot(a.sim)

## Type B Model
pars <- c(mu1 = 10.0, mu2 = 40.0, nu = 30.0, sigma1 = 0.01, sigma2 = 0.03)
b.sim <- sim.cppm("TypeB", pars, seed = 257)
b.sim
plot(b.sim, parents.distinct = TRUE)

## Type C Model
pars <- c(mu1 = 5.0, mu2 = 9.0, nu1 = 30.0, nu2 = 150.0,
               sigma1 = 0.01, sigma2 = 0.05)
c.sim <- sim.cppm("TypeC", pars, seed = 555)
c.sim
plot(c.sim, parents.distinct = FALSE)

NScluster documentation built on March 31, 2023, 5:14 p.m.