Simulation of the generalized Thomas model of type C.
SimulateTypeC(pars, seed = NULL, parents.distinct = FALSE, plot = TRUE)
a named vector of containing the values of the model parameters
(mu1
, mu2
, nu1
, nu2
, sigma1
,
sigma2
), where (mu
\(i\), nu
\(i\),
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
, nu1
, sigma1
)
and (mu2
, nu2
, 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
, nu1
, sigma1
) and the
remainder are generated from (mu2
, nu2
, 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
, nu1
, sigma1
) and
the remainder are generated from (mu2
, nu2
, sigma2
).
Consider the two types 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, 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})\), \(j=1,2,\dots,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)}, \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 = 5.0, mu2 = 9.0, nu1 = 30.0, nu2 = 150.0,
sigma1 = 0.01, sigma2 = 0.05)
SimulateTypeC(pars, seed = 555)
# }
Run the code above in your browser using DataLab