Hi all, I'm using spatstat to investigate the spatial structure of an arid shrub population. The first-order intensity of my data does not appear to be homogenous, so I would like to use inhomogeneous techniques. I realise there is a inhomogeneous K-function available in spatstat, but there doesn't not appear to be one for the pair-correlation function (O-ring statistic). As such I was planning to use a new technique (the K2 index) as described in Schiffers et al. (2008) [Ecography, 31:545-555]. The following website has more detail [http://www.oikos.ekol.lu.se/appendixdown/E5374-example.R]. Despite this I cannot get the function to run! I am not very familiar with R so it is likely my problem is simple. Does anyone have any experience with the K2-index who can give me some pointers? Many thanks Lauren This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
Spatstat - K2 index
3 messages · Gough Lauren, Rolf Turner, Adrian Baddeley
On 2/12/2008, at 4:30 AM, Gough Lauren wrote:
Hi all, I'm using spatstat to investigate the spatial structure of an arid shrub population. The first-order intensity of my data does not appear to be homogenous, so I would like to use inhomogeneous techniques. I realise there is a inhomogeneous K-function available in spatstat, but there doesn't not appear to be one for the pair-correlation function (O-ring statistic). As such I was planning to use a new technique (the K2 index) as described in Schiffers et al. (2008) [Ecography, 31:545-555]. The following website has more detail [http://www.oikos.ekol.lu.se/appendixdown/E5374-example.R]. Despite this I cannot get the function to run! I am not very familiar with R so it is likely my problem is simple. Does anyone have any experience with the K2-index who can give me some pointers?
In the first instance questions about a contributed package should be
directed
to the maintainer(s) of that package.
It is not clear to me what your question is. Can't get ***what***
function
to run? The file E5374-example.R sources ``Funktionen/K2.R'' to provide
the function K2, which is called upon later in this script. Have you
obtained
the file K2.R? If not, that is your first problem.
cheers,
Rolf Turner
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
Gough Lauren wrote:
I'm using spatstat to investigate the spatial structure of an arid shrub population. The first-order intensity of my data does not appear to be homogenous, so I would like to use inhomogeneous techniques. I realise there is a inhomogeneous K-function available in spatstat, but there doesn't not appear to be one for the pair-correlation function (O-ring statistic).
The function 'pcf' in spatstat computes the pair correlation function.
To compute the inhomogeneous version of the pair correlation function,
if X is your point pattern and Z is its estimated intensity (a pixel
image), type
K <- Kinhom(X, Z)
p <- pcf(K)
This uses the method 'pcf.fv' which computes an estimate of the
(inhomogeneous) pair correlation function by numerically differentiating
the inhomogeneous K function. See help(pcf) and help(pcf.fv).
In future versions of spatstat we will introduce a function pcf.inhom
that uses kernel smoothing to do the same task.
As such I was planning to use a new technique (the K2 index) as described in Schiffers et al. (2008) [Ecography, 31:545-555]. The following website has more detail [http://www.oikos.ekol.lu.se/appendixdown/E5374-example.R]. Despite this I cannot get the function to run!
You need the code file K2.R mentioned in this file. According to the cited article, the "K2 index" is just the derivative of the pair correlation function. Presumably the file K2.R computes a numerical estimate of the derivative (assuming that it exists). Adrian Baddeley