| sim.poissonc {ecespa} | R Documentation |
Generate a random point pattern, a simulated realisation of the Poisson Cluster Process
sim.poissonc(x.ppp, rho, sigma)
x.ppp |
Point pattern whose window and intensity will be simulated. An object with the
ppp format of spatstat. |
rho |
Parameter rho of the Poisson Cluster process. |
sigma |
Parameter sigma of the Poisson Cluster process. |
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)]
The simulated point pattern (an object of class "ppp").
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.
Marcelino de la Cruz Rot marcelino.delacruz@upm.es
Diggle, P.J. 2003. Statistical analysis of spatial point patterns. Arnold, London.
rNeymanScott in spatstat
## Not run:
data(gypsophylous)
## Estimate K function ("Kobs").
gyps.env <- envelope(gypsophylous, Kest, correction="iso")
plot(gyps.env, sqrt(./pi)-r~r)
## 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,
simulate=expression(sim.poissonc(gypsophylous,
sigma=sqrt(cosa.pc$sigma2), rho=cosa.pc$rho)))
plot(gyps.env.sim, main="")
## End(Not run)