kinhat {spatialkernel} | R Documentation |
Estimate the inhomogeneous K function of a non-stationary point pattern.
kinhat(pts, lambda, poly, s)
pts |
matrix of the x,y -coordinates of the point locations. |
lambda |
intensity function evaluated at the above point locations. |
poly |
matrix of the x,y -coordinates of the polygon boundary. |
s |
vector of distances at which to calculate the K function. |
The inhomogeneous K function is a generalization of the usual K function defined for a second-order intensity-reweighted stationary point process, proposed by Baddeley et al (2000).
When the true intensity function is unknown, and is to be estimated
from the same data as been used to estimate the K function,
a modified kernel density estimation implemented in lambdahat
with argument gpts=NULL
can be used to calculate the estimated intensity at data points.
See Baddeley et al (2000) for details,
and Diggle, P.J., et al (2006) for a cautious note.
A list with components
k |
values of estimated K at the distances s . |
s |
copy of s . |
This code is adapted from splancs (Rowlingson and Diggle, 1993)
fortran code for the estimation of homogeneous K function
khat
, with edge correction inherited
for a general polygonal area.