[R] Random labeling hypothesis in spatstat

Karla Falk karlafalk at trentu.ca
Fri Feb 20 21:27:55 CET 2009


  I am trying to test the random labeling hypothesis with my data.  I have a point pattern of bird nests and each nest has a mark that it is either predated or not-predated.  I want to test the null hypothesis that the K distribution of predation events is equal to the K distribution of all events (nests).   This is the code I am using:

Kdif <- function(X,...,i) {
Kidot <- Kdot(X,...,i=i)
K <- Kest(X,...)
dif <- eval.fv(Kidot-K)

E <- envelope(ppp, Kdif, nsim=100, i="Predated", simulate=expression(rlabel(ppp)))
plot(E, main="clustering of predation events")

I got this code from the 'Analazing spatial patterns in R Workshop notes', and it works fine, but not sure I understand exactly what it means.  Specifically I want to make sure that the Kidot is just looking at the distribution of predation events, but I am not sure if it is doing this.  What does Kdot(X,...,i=i) mean exactly?  It is much appreciated if anyone can help me understand this.  Thank you. Karla

More information about the R-help mailing list