sim.poissonc {ecespa} | R Documentation |
Simulate Poisson Cluster Process
Description
Generate a random point pattern, a simulated realisation of the Poisson Cluster Process
Usage
sim.poissonc(x.ppp, rho, sigma)
Arguments
x.ppp |
Point pattern whose window and intensity will be simulated. An object with the
|
rho |
Parameter |
sigma |
Parameter |
Details
The Poisson cluster processes are defined by the following postulates (Diggle 2003):
PCP1 | Parent events form a Poisson process with intensity rho . |
PCP2 | Each parent produces a random number of offspring, according to a probability distribution |
p[s]: s = 0, 1, 2, ... |
|
PCP3 | The positions of the offspring relative to their parents are distributed according to a bivariate pdf h . |
This implementation asumes that the probability distribution p[s]
of offspring per parent is a Poisson distribution and
that the position of each offspring relative to its parent follows a radially symetric Gaussian distribution with pdf
h(x, y) = [1/(2*pi*sigma^2)]* exp[-(x^2+y^2)/(2*sigma^2)]
Value
The simulated point pattern (an object of class "ppp
").
Warning
This implementation simulates only point patterns within rectangular windows. Use ipc.estK
to fit and
rIPCP
(or the spatstat
functions) to simulate point patterns within irregular windows.
Note
This function can use the results of pc.estK
to simulate point patterns from a fitted model.
Be careful as the paramted returned by pc.estK
is sigma^2
while sim.poissonc
takes
its square root, i.e. sigma
.
Author(s)
Marcelino de la Cruz Rot
References
Diggle, P.J. 2003. Statistical analysis of spatial point patterns. Arnold, London.
See Also
rIPCP
to simulate inhomogeneous PCP; rNeymanScott
and rThomas
in spatstat
Examples
data(gypsophylous)
# set the number of simulations (nsim=199 or larger for real analyses)
nsim<- 39
## Estimate K function ("Kobs").
gyps.env <- envelope(gypsophylous, Kest, correction="iso", nsim=nsim)
plot(gyps.env, sqrt(./pi)-r~r, legend=FALSE)
## Fit Poisson Cluster Process. The limits of integration
## rmin and rmax are setup to 0 and 60, respectively.
cosa.pc <- pc.estK(Kobs = gyps.env$obs[gyps.env$r<=60],
r = gyps.env$r[gyps.env$r<=60])
## Add fitted Kclust function to the plot.
lines(gyps.env$r,sqrt(Kclust(gyps.env$r, cosa.pc$sigma2,cosa.pc$rho)/pi)-gyps.env$r,
lty=2, lwd=3, col="purple")
## A kind of pointwise test of the pattern gypsophilous been a realisation
## of the fitted model, simulating with sim.poissonc and using function J (Jest).
gyps.env.sim <- envelope(gypsophylous, Jest, nsim=nsim,
simulate=expression(sim.poissonc(gypsophylous,
sigma=sqrt(cosa.pc$sigma2), rho=cosa.pc$rho)))
plot(gyps.env.sim, main="")