SimulateTypeB: Simulation of the Generalized Thomas Model of Type B

Description Usage Arguments Details Value References Examples

View source: R/NScluster.R

Description

Simulation of the generalized Thomas model of type B.

Usage

1
  SimulateTypeB(pars, seed = NULL, parents.distinct = FALSE, plot = TRUE)

Arguments

pars

a named vector of containing the values of the model parameters (mu1, mu2, nu, sigma1, sigma2), where (mui, nu, sigmai) is an intensity of parents, an expected number of descendants, a parameter of the dispersal kernel for superposed component i (i = 1,2), respectively.

seed

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

parents.distinct

logical. If TRUE, points are distinguished by two groups specified by parameters (mu1, nu, sigma1) and (mu2, nu, sigma2).

plot

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

Details

Consider the two types of the Thomas model with parameters (μ1, ν, σ1) and (μ2, ν, σ2). Parents' configuration and numbers of the offspring cluster sizes are generated by the two types of uniformly distributed parents (x_i^k, y_i^k) with i=1,2,...,Poisson(μk) for k=1,2, respectively.

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

x_j^{k,i} = x_i^k + r_k cos (2πU),

y_j^{k,i} = y_i^k + r_k sin (2πU),

where

r_k = σk √{ -2log(1-Uk) }, k = 1, 2,

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

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. xy[1:n[1], 1:2] are generated from parameters (mu1, nu, sigma1) and the remainder are generated from (mu2, nu, sigma2).

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. xy[1:n[1], 1:2] are generated from parameters (mu1, nu, sigma1) and the remainder are generated from (mu2, nu, sigma2).

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

1
2
pars <- c(mu1 = 10.0, mu2 = 40.0, nu = 30.0, sigma1 = 0.01, sigma2 = 0.03)
SimulateTypeB(pars, seed = 257)

NScluster documentation built on March 19, 2018, 9:03 a.m.