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

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to