[R-sig-Geo] simulation envelopes with Kmark(), for an inhomogeneous point pattern

Christopher W. Ryan cry@n @end|ng |rom b|ngh@mton@edu
Fri Jun 21 18:44:14 CEST 2024


It's been a while since I've worked with point patterns.

I have a marked point pattern X consisting of household locations, with
the marks being waiting time to get a lab test. I'm interested in the
spatial distribution of those waiting times. Among other exploratory
methods, I'm looking at Kest(), Kinhom(), and Kmark(), all with
simulation envelopes.

Disregarding the marks, certainly the points are not CSR. The center of
our county is urban, the periphery rural.

envelope(X, Kinhom, nsim = 99)  ## not adjusting other arguments, for
sake of discussion

is pretty straightforward, but disregards the marks.

envelope(X, Kmark, nsim = 99)

also seems useful.  But does it address the inhomogeneity of the
locations (considered simply as unmarked points)?

Guess what I'm asking is: Is there an inhomogeneous version of Kmark, or
is it an inevitable part of how Kmark works? Or are these meaningless
questions?

I thought of calculating the (inhomogeneous) density of X first, and
using it to generate the 99 simulated patterns in envelope, like this,
as at top of page 401 in Spatial Point Patterns, Baddeley et al:

D <- density(X)
envelope(X, Kmark, simulate = expression(rpoispp(D)), nsim = 5)  ##
fewer sims while figuring this out

but it produces an error for each attempted simulation:

Error in (function (X, f = NULL, r = NULL, correction = c("isotropic",  :
  is.ppp(X) && is.marked(X) is not TRUE

I think I'm failing to generate the marks in the simulated patterns?

Grateful for any advice.

Thanks.

--Chris Ryan
SUNY Upstate Medical University
Binghamton, NY, US



More information about the R-sig-Geo mailing list