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"))
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.