[R] Permutation test of marked point pattern
Jean-Francois Savard
jsavard at umd.edu
Wed May 3 21:01:52 CEST 2006
Dear R users,
I am trying to perform a hypothesis test on a marked point pattern. I
would like to calculate the mean of the absolute value of the
difference of marks between nearest neigbours, randomize the marks
among points, then calculate this mean again. Ideally, I would test
whether random mean values smaller than the observed mean value occur
less than 5% of the time. I suppose 1000 permutations would be a
reasonable starting point (the ppp object has 27 points).
so far, I've figured out how to:
-create a marked ppp object: ms.ppp
-calculate my test statistic:
teststat <- mean(abs(markstat(ms.ppp, diff, N=2)))
-randomly allocate marks to a point pattern:
Y <- rlabel (ms.ppp, labels=ms.ppp$marks, permute=TRUE)
I have looked at perm.test{exactRankTests} and perused the R help
archive but haven't been able to find how to work the permutation test
with a marked ppp object.
I thank you in advance for any help,
J-F Savard
Doctoral Candidate
University of Maryland
More information about the R-help
mailing list