Version: 1.3.6-4
Title: Simulation and Estimation of the Neyman-Scott Type Spatial Cluster Models
Depends: R (≥ 3.0.0)
Imports: graphics, stats, utils, methods
Description: Simulation and estimation for Neyman-Scott spatial cluster point process models and their extensions, based on the methodology in Tanaka, Ogata, and Stoyan (2008) <doi:10.1002/bimj.200610339>. To estimate parameters by the simplex method, parallel computation using 'OpenMP' application programming interface is available. For more details see Tanaka, Saga and Nakano <doi:10.18637/jss.v098.i06>.
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
Contact: ismrp@jasp.ism.ac.jp
NeedsCompilation: yes
Packaged: 2025-04-29 05:50:03 UTC; msaga
Author: Ushio Tanaka [aut] (Fortran original), Masami Saga [aut, cre], Junji Nakano [aut]
Maintainer: Masami Saga <msaga@mtb.biglobe.ne.jp>
Repository: CRAN
Date/Publication: 2025-04-30 07:30:05 UTC

Simulation and Estimation of the Neyman-Scott Type Spatial Cluster Models

Description

NScluster involves the maximum Palm likelihood estimation procedure for Neyman-Scott cluster point process models and their extensions with parallel computation using OpenMP technology. The maximum Palm likelihood estimates (MPLEs for short) are those that maximize the log-Palm likelihood function. The computation of MPLEs is implemented by simplex maximization with parallel computation via OpenMP. Together with the likelihood estimation procedure, NScluster also provides a simulation procedure for cluster point process models.

Details

The documentation 'A Guide to NScluster: R Package for Maximum Palm Likelihood Estimation for Cluster Point Process Models using OpenMP' is available in the package vignette using the vignette function (e.g., vignette("NScluster")).

The package NScluster comprises of four tasks: simulation, parameter estimation (MPLE), confidence interval estimation, and non-parametric and parametric Palm intensity comparison.

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/

Tanaka, U., Ogata, Y. and Stoyan, D. (2008) Parameter estimation and model selection for Neyman-Scott point processes. Biometrical Journal 50, 43-57.

Tanaka, U., Saga, M. and Nakano, J. (2021) NScluster: An R Package for Maximum Palm Likelihood Estimation for Cluster Point Process Models Using OpenMP. Journal of Statistical Software, 98(6), 1-22. doi:10.18637/jss.v098.i06.


Bootstrap resampling for MPLE

Description

Carry out bootstrap replicates of MPLE on simulated data.

Usage

boot.mple(mple.out, n = 100, conf.level = 0.95, se = TRUE, trace = FALSE)

## S3 method for class 'boot.mple'
summary(object, ...)

Arguments

mple.out

an object of class "mple", usually the result of a call to mple.cppm.

n

number of bootstrap replicates performed.

conf.level

the confidence level required.

se

logical. If TRUE standard errors are returned.

trace

logical: if TRUE, a progress bar is shown.

object

an object of class "boot.mple".

...

ignored.

Value

boot.mple returns an object of class "boot.mple" containing the following components:

boot.mples

a matrix of n rows each of which is a bootstrap replicate of the result of calling mple.cppm.

confint

confidence intervals for MPLEs.

mple

MPLE of mple.out passed as 'pars' argument to sim.cppm.

Examples

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

## Not run:  # estimation (need long CPU time)
init.pars <- c(mu = 40.0, nu = 40.0, sigma = 0.05)
t.mple <- mple.cppm("Thomas", t.sim$offspring$xy, init.pars)
t.boot <- boot.mple(t.mple)
summary(t.boot)

## End(Not run)

MPLE of Neyman-Scott Cluster Point Process Models and Their Extensions

Description

MPLE of the five cluster point process models.

Usage

mple.cppm(model = "Thomas", xy.points, pars = NULL, eps = 0.001, uplimit = 0.3,
          skip = 1)

## S3 method for class 'mple'
coef(object, ...)
## S3 method for class 'mple'
summary(object, ...)

Arguments

model

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

xy.points

a matrix containing the coordinates (x,y) of points in W=[0,1]\times[0,1].

pars

a named vector containing a given initial guess of each parameter. If NULL, any suitable parameters are used. See Details' in sim.cppm for the parameters of each model.

eps

the sufficiently small number to implement the optimization procedure for the log-Palm likelihood function. The procedure is iterated at most 1000 times until the process2$stderr becomes smaller than the eps.

uplimit

upper limit in place of \infty of the integral in the probability distribution function relative to the random distance between two descendant points within the same cluster. The uplimit is valid for "IP" and "TypeA".

skip

the variable enables one to obtain speedily the initial MPLEs, but rough approximation. The skip calculates the Palm intensity function of the log-Palm likelihood function for every skip-th r_{ij} in the ordered distances of the pairs i and j. The skip is valid for "IP" and "TypeA".

object

an object of class "mple".

...

ignored.

Details

For the inverse-power model and the Type A models, we need to take the alternative form without explicit representation of the Palm intensity function. See the second reference below for details.

Value

mple.cppm returns an object of class "mple" containing the following main components:

mple

MPLE (maximum Palm likelihood estimate).

log.mpl

the log maximum Palm likelihood.

aic

AIC.

process1

a list with following components.

cflg

1 (="update") or -1 (="testfn"), where "update" indicates that -log L value has attained the minimum so far, otherwise not.

logl

the minimized -log L in the process to minimize the negative log-Palm likelihood function.

mples

corresponding MPLEs.

process2

a list with following components.

logl.simplex

the minimized -log L by the simplex method.

stderr

standard error.

pa.normal

the normalized variables corresponding to the MPLEs relative to the initial estimates.

There are other methods plot.mple and print.mple for this class.

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/.

Tanaka, U., Ogata, Y. and Stoyan, D. (2008) Parameter estimation and model selection for Neyman-Scott point processes. Biometrical Journal 50, 43-57.

Examples

## Not run: 
# The computation of MPLEs takes a long CPU time in the minimization procedure,
# especially for the Inverse-power type and the Type A models.

### Thomas Model
 # simulation
 pars <- c(mu = 50.0, nu = 30.0, sigma = 0.03)
 t.sim <- sim.cppm("Thomas", pars, seed = 117)
 ## estimation
 init.pars <- c(mu = 40.0, nu = 40.0, sigma = 0.05)
 t.mple <- mple.cppm("Thomas", t.sim$offspring$xy, init.pars)
 coef(t.mple)

### Inverse-Power Type Model
 # simulation
 pars <- c(mu = 50.0, nu = 30.0, p = 1.5, c = 0.005)
 ip.sim <- sim.cppm("IP", pars, seed = 353)
 ## estimation
 init.pars <- c(mu = 55.0, nu = 35.0, p = 1.0, c = 0.01)
 ip.mple <- mple.cppm("IP", ip.sim$offspring$xy, init.pars, skip = 100)
 coef(ip.mple)

### Type A Model
 # simulation
 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)
 ## estimation
 init.pars <- c(mu = 60.0, nu = 40.0, a = 0.5, sigma1 = 0.01, sigma2 = 0.1)
 a.mple <- mple.cppm("TypeA", a.sim$offspring$xy, init.pars, skip = 100)
 coef(a.mple)

### Type B Model
 # simulation
 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)
 ## estimation
 init.pars <- c(mu1 = 20.0, mu2 = 30.0, nu = 30.0, sigma1 = 0.02, sigma2 = 0.02)
 b.mple <- mple.cppm("TypeB", b.sim$offspring$xy, init.pars)
 coef(b.mple)

### Type C Model
 # simulation
 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)
 ## estimation
 init.pars <- c(mu1 = 10.0, mu2 = 10.0, nu1 = 30.0, nu2 = 120.0,
                sigma1 = 0.03, sigma2 = 0.03)
 c.mple <- mple.cppm("TypeC", c.sim$offspring$xy, init.pars)
 coef(c.mple)

## End(Not run)

Non-parametric and Parametric Estimation for Palm Intensity

Description

Compute the non-parametric and the parametric Palm intensity function of the Neyman-Scott cluster point process models and their extensions.

Usage

palm.cppm(mple, pars = NULL, delta = 0.001, uplimit = 0.3)

## S3 method for class 'Palm'
print(x, ...)

Arguments

mple

an object of class "mple".

pars

a named vector of the true parameters, if any.

delta

a width for the non-parametric Palm intensity function.

uplimit

upper limit in place of \infty of the integral in the probability distribution function relative to the random distance between two descendant points within the same cluster. The uplimit is valid for "IP" and "TypeA".

x

an object of class "Palm".

...

ignored.

Value

An object of class "Palm" containing the following components:

r

the distance r=j\Delta, where j=1,2,\dots,[R/\Delta], [\cdot] is the Gauss' symbol and R=1/2 in the program.

np.palm

the corresponding values of the non-parametric Palm intensity function, which is normalized by the total intensity estimate (the mean number of points in W) of a given point pattern data.

norm.palm

the corresponding values of the normalized Palm intensity function, i.e., \lambda_{\bm{o}}(r)/\hat{\lambda}, where \lambda_{\bm{o}}(r) is the Palm intensity and \lambda is an intensity of a cluster point process model. See 'Details' in mple.cppm.

There is another method plot.Palm for this class.

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/.

See Also

See sim.cppm and mple.cppm to simulate the Neyman-Scott cluster point process models and their extensions and to compute the MPLEs, respectively.

Examples

## Not run: 
# The computation of MPLEs takes a long CPU time in the minimization procedure,
# especially for the Inverse-power type and the Type A models.

### Thomas Model
 #simulation
 pars <- c(mu = 50.0, nu = 30.0, sigma = 0.03)
 t.sim <- sim.cppm("Thomas", pars, seed = 117)
 ## estimation => Palm intensity
 init.pars <- c(mu = 40.0, nu = 40.0, sigma = 0.05)
 t.mple <- mple.cppm("Thomas", t.sim$offspring$xy, init.pars)
 t.palm <- palm.cppm(t.mple, pars)
 plot(t.palm)

### Inverse-Power Type Model
 # simulation
 pars <- c(mu = 50.0, nu = 30.0, p = 1.5, c = 0.005)
 ip.sim <- sim.cppm("IP", pars, seed = 353)
 ## estimation => Palm intensity
 init.pars <- c(mu = 55.0, nu = 35.0, p = 1.0, c = 0.01)
 ip.mple <- mple.cppm("IP", ip.sim$offspring$xy, init.pars, skip = 100)
 ip.palm <- palm.cppm(ip.mple, pars)
 plot(ip.palm)

### Type A Model
# simulation
 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)
 ## estimation => Palm intensity
 init.pars <- c(mu=60.0, nu=40.0, a=0.5, sigma1=0.01, sigma2=0.1)
 a.mple <- mple.cppm("TypeA", a.sim$offspring$xy, init.pars, skip=100)
 a.palm <- palm.cppm(a.mple, pars)
 plot(a.palm)

### Type B Model
 # simulation
 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)
 ## estimation => Palm intensity
 init.pars <- c(mu1 = 20.0, mu2 = 30.0, nu = 30.0, sigma1 = 0.02, sigma2 = 0.02)
 b.mple <- mple.cppm("TypeB", b.sim$offspring$xy, init.pars)
 b.palm <- palm.cppm(b.mple, pars)
 plot(b.palm)


### Type C Model
 # simulation
 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)
 ## estimation => Palm intensity
 init.pars <- c(mu1 = 10.0, mu2 = 10.0, nu1 = 30.0, nu2 = 120.0,
                sigma1 = 0.03, sigma2 = 0.03)
 c.mple <- mple.cppm("TypeC", c.sim$offspring$xy, init.pars)
 c.palm <- palm.cppm(c.mple, pars)
 plot(c.palm)

## End(Not run)

Plot Non-Parametric and Parametric Normalized Palm Intensity

Description

Plot method for objects of class "Palm".

Usage

## S3 method for class 'Palm'
plot(x, ..., log = "xy")

Arguments

x

an object of class "Palm", usually the result of a call to palm.cppm.

...

optional. At most 4 additional objects of class "Palm".

log

a character string indicating if logarithmic axes are to be used.


Show the Process for Optimizing Parameter Set

Description

Plot method for object of class "mple" shows process for optimizing the normalized parameters depending on a given initial guess of each parameter.

Usage

## S3 method for class 'mple'
plot(x, ...)

Arguments

x

an object of class "mple" returned by mple.cppm.

...

further graphical parameters from par.


Print Process for Maximizing Log-Palm Likelihood Function

Description

Print the process for minimizing the negative log-Palm likelihood function and/or the process for optimizing the normalized parameters depending on a given initial guess of each parameter by the simplex method.

Usage

## S3 method for class 'mple'
print(x, print.level = 0, ...)

Arguments

x

an object of class "mple" returned by mple.cppm.

print.level

We have the following processes:

0

output initial values and MPLE.

1

output the process for minimizing the negative log-Palm likelihood function, in addition. (x$process1)

2

output the process for optimizing the normalized parameters depending on a given initial guess of each parameter by the simplex method, in addition. (x$process2)

3

output both processes.

...

ignored.


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.

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)