0

I have a dataset (data) I want to analyse using spatstat in R. The observed area is a polygon. The marks for my data are numeric values, 1 and 0. If the spot (circle) has a mark of 0, it will be white, and if it has a mark of 1, it will be coloured green. I want to analyse the green point distribution. I want to know if they are clustered by using any quantification method, such as the Moran test or any other methods). The issue is that (you can see the plot below) instead of only analysing the green circle relative to the whole polygon area, I want to analyse whether the green circles are clustered relative to the white circles. It is what makes me confused. How can I apply the Moran test or other quantification methods for the analysis?

x = c(3,0.5,1,0,0,0,2,2.5,5.5, 16,21,26,28,40, 47, 52, 58, 60, 65, 63, 63, 75, 77, 78, 75)
y = c(116,106,82.5,64,40,35,25,17.5,5,5,5,8,10,8, 14, 14, 10, 0, 0, 17, 20, 24, 30, 50, 116)
p <- owin(poly = cbind(x, y))
point_pattern = as.ppp(deviation_binary_locations_marks, p)
marks(point_pattern) <- as.factor(deviation_binary_locations_marks[, "APOD"])
table(marks(point_pattern))
plot(point_pattern,which.marks="APOD", main="Point pattern for gene APOD", chars = c("o","o"), bg = c("white", "green"),pch = 21, size = 0.75, cols = c("black", "green"), leg.side=c("left"))

plot

I think that the locations of marks (labelled 1) are randomly distributed similar to the locations of accidents, while all locations of circles are fixed (look like polygon) I consider this as the window of observations.

MK Huda
  • 605
  • 1
  • 6
  • 16

1 Answers1

1

This is a question about statistical methodology rather than software, so it really belongs in stackexchange rather than stackoverflow. But anyway:

The methods in the spatstat package apply to point data where the point locations are not fixed in advance - for example, the locations of accidents. The Moran I index assumes that the locations are fixed and the labels attached to them are random. Which scenario is more appropriate to your data? If the points are trees and the labels are disease state, then the trees are effectively fixed locations. Then you probably need a package such as spdep which deals with this case.

Adrian Baddeley
  • 2,534
  • 1
  • 5
  • 8
  • The Moran index seems the correct one. The circles are fixed locations (at first all circles are white and distributed in the shape of the polygon I define), and then the label (marks) are randomly attached to those circles by colouring them green. The circle with green colours are those that have attached labels (and labelled value 1), while the circles that remain white are those that are not labelled hence labelled value 0. Does it make sense? – MK Huda Nov 06 '22 at 10:35