ipc.estK {ecespa}R Documentation

Fit the (In)homogeneous Poisson Cluster Point Process by Minimum Contrast

Description

Fits the (In)homogeneous Poisson Cluster point process to a point pattern dataset by the Method of Minimum Contrast.

Usage

ipc.estK(mippp, lambda = NULL, correction = "iso", r = NULL, sigma2 = NULL,
            rho = NULL, q = 1/4, p = 2)

## S3 method for class 'ecespa.minconfit':
plot(x, type="L", add=FALSE, xlim=NULL, ylim=NULL, lwd=c(1,1),
           lty=c(1,2), col=c(1,2), main=NULL, ...)

Arguments

mippp Point pattern to which the (I)PCP will be fitted. A point pattern with the ppp format of spatstat.
lambda Optional. Values of the estimated intensity function as a pixel image (object of class "im" of spatstat) giving the intensity values at all locations of mippp.
correction A character item selecting any of the options "border", "bord.modif", "isotropic", "Ripley" or "translate". It specifies the edge correction(s) to be applied in the computation of the K(r) function.
r Numeric vector. The values of the argument r at which the K(r) functions should be evaluated.
sigma2 Optional. Starting value for the parameter sigma2 of the Poisson Cluster process.
rho Optional. Starting value for the parameter rho of the Poisson Cluster process.
q q exponent of the contrast criterion (see mincontrast).
p p exponent of the contrast criterion (see mincontrast).
x An object of class 'ecespa.minconfit', resulting of applying ipc.estK to fit a Poisson Cluster Process.
type Type of function to be ploted. If type="L", function L(r) [= sqrt(K(r)/pi)-r] is ploted. Otherwise, function K(r) is ploted.
add Logical. Should the curves be added to another plot?
xlim Vector setting the limits of the x-axis.
ylim Vector setting the limits of the y-axis.
lwd Vector (length=2) setting the line width for ploting the two functions.
lty Vector (length=2) setting the line type for ploting the two functions.
col Vector (length=2) setting the line color for ploting the two functions.
main Optional. Text to appear as a title of the plot.
... Additional graphical parameters passed to link{plot}.

Details

The algorithm fits the (inhomogeneous) Poisson cluster point process (PCP) to a point pattern, by finding the parameters of the (inhomogeneous) Poisson cluster model which give the closest match between the theoretical K function of the Poisson cluster process and the observed K function. For a concise explanation of the PCP see pc.estK. For a more detailed explanation of the Method of Minimum Contrast, see mincontrast in spatstat or Diggle (2003: 86).

The inhomogeneous PCP can be thought of as a thinned process of an homogeneous PCP, where the spatially varying thinning probability f(s) is related to the spatially varying intensity function lambda(s) as f(s) = lambda(s)/max{lambda(s)} (Waagepetersen, 2007). As the inhomogeneous K function for the IPCP coincides with the (homogeneous) K function for the corresponding homogeneous PCP, the parameters of the underlying homomgeneous PCP can be estimated as those that give the closest match between the theoretical K function for the homogeneous PCP and the empirical inhomogeneous K function for the observed IPCP.

This Poisson cluster process can be simulated with rIPCP.

Value

ipc.estK gives an object of class 'ecespa.minconfit', basically a list with the following components:

sigma2 Parameter sigma^2.
rho Parameter rho.
d.theta Minimized value of the contrast criterion D(theta).
Kobs Values of the observed K-function.
Kfit Values of the fitted K-function.
r Sequence of distances at which Kobs and Kfit have been estimated.
data Original point pattern.
lambda Original intensity function.
dataname Name of the original point pattern.
lambdaname Name of the original intensity function image.
q q exponent of the contrast criterion.
p p exponent of the contrast criterion.

Author(s)

Marcelino de la Cruz Rot marcelino.delacruz@upm.es, inspired by some code of Philip M. Dixon http://www.public.iastate.edu/~pdixon/

References

Diggle, P. J. 2003. Statistical analysis of spatial point patterns. Arnold, London.

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

See Also

some functions in spatstat: mincontrast for a more general implementation of the method of mimimum contrast; matclust.estK and lgcp.estK fit other appropriate processes for clustered patterns.

Examples

## Not run: 

#####################
## Same example as in pc.estK

data(gypsophylous)

## Estimate K function ("Kobs").

gyps.env <- envelope(gypsophylous, Kest, correction="iso", nsim=99)

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.pc2 <- ipc.estK(gypsophylous, r = gyps.env$r[gyps.env$r<=60])

## Add fitted Kclust function to the plot.

plot(cosa.pc2, add=T, lwd=c(3,3))

## A kind of pointwise test of the gypsophylous pattern been a realisation
## of the fitted model, simulating with sim.poissonc and using function J (Jest).

gyps.env.sim2 <- envelope(gypsophylous, Jest, nsim=99,
                    simulate=expression(rIPCP(cosa.pc2)))

plot(gyps.env.sim2,  main="")

#####################
## Inhomogeneous example

data(urkiola)

# get univariate pp
I.ppp <- split.ppp(urkiola)$birch

#estimate inhomogeneous intensity function
I.lam <- predict (ppm(I.ppp, ~polynom(x,y,2)), type="trend", ngrid=200)

# Compute and plot envelopes to Kinhom, simulating from an Inhomogeneous Poisson Process:
I2.env <- envelope( I.ppp,Kinhom, lambda=I.lam, correction="trans", 
                            nsim=99, simulate=expression(rpoispp(I.lam)))
plot(I2.env, sqrt(./pi)-r~r) 

# It seems that there is short scale clustering; lets fit an IPCP: 

I.ki <- ipc.estK(mippp=I.ppp, lambda=I.lam, correction="trans")

# Compute and plot envelopes to Kinhom, simulating from the fitted IPCP:

Ipc.env= Ki(I.ki, correction="trans", nsim=99, ngrid=200)
plot (Ipc.env)

## End(Not run)

[Package ecespa version 1.1-1 Index]