Search code examples
rstatisticsspatialmontecarlospatstat

Monte Carlo test of spatial segregation


I have trouble intrepreting the result which I get from the segregation.test method in spatstat. However, I have three different point patterns A,B,C and I want to prove that C and B are correlating whereas A and B not. You can see the Kernel estimates of intensity in this picture:

enter image description here

But computing this in R with spatstat package I always get the same p-value, although the test statistic T is different… How is this possible? What does the test statistic T mean in this context? And why do I get the exact same p-value?

I hope you can help what I did wrong doing this Monte Carlo test.


Solution

  • The meaning of the test statistic T is clearly explained in the help file. Did you look at it?

    ?segregation.test
    

    Under the null hypothesis of no segregation in the Monte Carlo test the data pattern and the simulated patterns are exchangeable. The p-value is calculated by the rank of the test statistic of the observed pattern out of the total number of patterns. In both cases you have presented the observed data had the most extreme segregation statistic T, and the p-value is 1/26 = 0.03846.

    To understand the details look at the mentioned help file and Chapters 10 and 14 of the spatstat book. (Unfortunately none of these are free sample chapters.)

    Edit: The test statistic T is a measure of the degree of segregation. If the points are randomly labeled it tends to be close to 0 and if the marks are very well separated it tends to be numerically "large". Since there is no notion of "large" the Monte Carlo p-value is used to judge whether the observed T is so large that we should reject the null hypothesis of random labeling.