The first problem:
ACd<-pairdist(A) instead of ACd <- pairdist(AC)
pairdist() is the wrong function: that calculates the mean distance
between ALL points, A to A and C to C as well as A to C.
You need crossdist() instead.
The most flexible approach is to roll your own permutation test. That
will work even if B and C are different sizes, etc. If you specify the
problem more exactly, there are probably parametric tests, but I like
A <- rpoispp(100) ## First event
B <- rpoispp(50) ## Second event
C <- rpoispp(50) ## Third event
plot(B, col="red", add=T)
plot(C, col="blue", add=T)
The difference between ACd and ABd is indistinguishable from that
obtained by a random resampling of B and C.
On Fri, Nov 22, 2019 at 8:26 AM ASANTOS via R-sig-Geo
<[hidden email]> wrote:
> Dear R-Sig-Geo Members,
> I have the hypothetical point process situation:
> A <- rpoispp(100) ## First event
> B <- rpoispp(50) ## Second event
> C <- rpoispp(50) ## Third event
> plot(A, pch=16)
> plot(B, col="red", add=T)
> plot(C, col="blue", add=T)
> I've like to know an adequate spatial approach for comparing if on
> average the event B or C is more close to A. For this, I try to make:
> # 0.5112954
> # 0.5035042
> With this naive approach, I concluded that event C is more close of A
> that B. This sounds enough for a final conclusion or more robust
> analysis is possible?
> Thanks in advance,