Simulation of the generalized Thomas model of type B.
SimulateTypeB(pars, seed = NULL, parents.distinct = FALSE, plot = TRUE)
a named vector of containing the values of the model parameters
(mu1
, mu2
, nu
, sigma1
, sigma2
), where
(mu
\(i\), nu
, sigma
\(i\)) is an intensity of
parents, an expected number of descendants, a parameter of the dispersal
kernel for superposed component \(i\) (\(i = 1,2\)), respectively.
a positive integer, which is the seed for a sequence of uniform random numbers. The default seed is based on the current time.
logical. If TRUE, points are distinguished by two
groups specified by parameters (mu1
, nu
, sigma1
) and
(mu2
, nu
, sigma2
).
logical. If TRUE
(default), simulated parent points and
offspring points are plotted.
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
).
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
).
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 offspring 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 offspring coordinates \((x_j^{k,i}, y_j^{k,i})\) of the parents \((k,i)\) with \(k=1,2\) and \(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\).
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.
# NOT RUN {
pars <- c(mu1 = 10.0, mu2 = 40.0, nu = 30.0, sigma1 = 0.01, sigma2 = 0.03)
SimulateTypeB(pars, seed = 257)
# }
Run the code above in your browser using DataLab