I am trying to do some cololcaization analysis, i.e. I want to show if one cell type tends to show up closer to another different celltype significantly in a microsopy image.
I tried to do this with R spatstat package I was able to visualize my dataset:
mypattern is one kind of cell and mypattern2 ist another kind of cell. When u look at the L-plots you can see that there is some kind of clustering as the curve is deviating from poission.
I thought about using nearest neighbor apporoach which is the nncross function in spatstat. But how can I show now if this distance is random (two random point pattern) or significantly relevant? Does anyone has an idea? I saw a lot about simulations like Monte-Carlo but I have no idea how to begin coding...
I would be glad for any help!
Kind regards, Hashirama

The L function should not be used here because the data are highly inhomogeneous.
I suggest you combine the two point patterns into a single "marked" point pattern,
Then estimate the spatially-varying densities of points
or the spatially varying proportions of each type of cell
You can also use
segregation.testor a contingency table of nearest neighbours (dixon).See Chapter 14 of the spatstat book and the help files for
relrisk,density.splitpppandsegregation.test.