Generate a random point pattern, a simulated realisation of the Inhomogeneous Poisson Cluster Process.

1 |

`x` |
an object of class |

`lambda` |
Optional. Values of the estimated intensity function as a pixel image (object of class "im" of |

`type` |
Type of 'prethining' employed in the simulation. See details. |

`lmax` |
Optional. Upper bound on the values of lambda. |

`win` |
Optional. Window of the simulated pattern. |

`...` |
Optional. Arguments passed to |

This function simulates the Inhomogeneous Poisson Cluster process from an object of class `'ecespa.minconfit'`

, resulting from fitting an IPCP to some 'original' point pattern
using the function `ipc.estK`

. Following the approach of Waagepetersen (2007), the simulation involves a first step in which an homogeneous aggregated pattern
is simulated (from the fitted parameters of the `'ecespa.minconfit'`

object, using function `rThomas`

of `spatstat`

) and a second one in which
the homogeneous pattern is thinned with a spatially varying thinning probability *f (s)* proportional to the spatially varying intensity, i.e. *f (s) = lambda(s) / max[lambda(s)]*.
To obtain a 'final' density similar to that of the original point pattern, a "prethinning" must be performed. There are two alternatives. If the argument `'type'`

is set equal to '1',
the expected number of points per cluster (*mu* parameter of `rThomas`

is thinned as *mu <- mu.0 / mean[f(s)]*, where *mu.0* is the
mean number of points per cluster of the original pattern. This alternative produces point patterns most similar to the 'original'. If the argument `'type'`

is set equal to '2',
the fitted intensity of the Poisson process of cluster centres (*kappa* parameter of `rThomas`

, i.e. the intensity of 'parent' points) is thinned
as *kappa <- kappa / mean[f(s)]*. This alternative produces patterns more uniform than the 'original' and it is provided only for experimental purposes.

A point pattern, with the format of the `ppp`

objects of `spatstat`

.

Marcelino de la Cruz Rot marcelino.delacruz@upm.es

Waagepetersen, R. 2007. An estimating function approach to inference for inhomogeneous Neyman-Scott processes. *Biometrics* 63:252-258.

`sim.poissonc`

to simulate homogeneous PCP; `rNeymanScott`

and `rThomas`

in spatstat are the basis of this function

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ```
## Not run:
data(gypsophylous)
plot(gypsophylous)
## It 'seems' that the pattern is clustered, so
## fit a Poisson Cluster Process. The limits of integration
## rmin and rmax are setup to 0 and 60, respectively.
cosa.pc2 <- ipc.estK(gypsophylous, r = seq(0, 60, by=0.2))
## Create one instance of the fitted PCP:
pointp <- rIPCP( cosa.pc2)
plot(pointp)
#####################
## Inhomogeneous example
data(urkiola)
# get univariate pp
I.ppp <- split.ppp(urkiola)$birch
plot(I.ppp)
#estimate inhomogeneous intensity function
I.lam <- predict (ppm(I.ppp, ~polynom(x,y,2)), type="trend", ngrid=200)
# It seems that there is short scale clustering; lets fit an IPCP:
I.ki <- ipc.estK(mippp=I.ppp, lambda=I.lam, correction="trans")
## Create one instance of the fitted PCP:
pointpi <- rIPCP( I.ki)
plot(pointpi)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.