I am currently analyzing a point pattern in R using the "spatstat" package. I am comparing two different areas, therefore I made two plots for each area (first two plot-left-area1; second two plots-right-area2) I applied ginhom(r) for all the points from each area and the points have a random pattern, here is an example of the script:
#pcfinhom for area1 (first two plots) bwp<- bw.pcf(poi_all, divisor="r", kernel="epanechnikov") #bw=1.426384 m r1i<- envelope(poi_all, pcfinhom, nsim = 1000, savefuns=TRUE, conf.level= 0.95, correction= "isotropic", kernel = "epanechnikov", bw = bwp, renormalise=TRUE) plot(r1i, xlab ="Distance r [m]", main= "pcf - Protected area", xlim = c(0,40), ylim=c(0,5), legend= F) rlii<-LF.gof(r1i) # p value = 0.2117882 points are random
However, when I apply Kcross.inhom(r) to the assess the spatial relationship between different tree sizes from the area1 (first two plots), I receive strange graphs that I am not sure if are correct:
bw1 <- bw.diggle(poi_rr1, correction="isotropic", hmax=NULL, nr=400) #bw=9 m pikros <- envelope(poi_rr1, Kcross.inhom, nsim=1000, i="A", j="S", correction = "isotropic",savefuns=TRUE, bw = bw1, renormalise=TRUE) plot(pikros,main="Cross-K inhom - Protected area", xlab = "Distance r [m]",xlim = c(0,40), ylim=c(0, 500), legend = F) pk <- LF.gof(pikros) # p value= 0.00990099 saplings are clustered around adults
I applied the same script for adults-intermediate (A, I) and intermediate-saplings (I,S) and the results can be seen in the following graphs:
For all the graphs, the p values are significant. I tried bw.diggle = 9.6m, bw.stoyan = 1 m and bw.pcf= 3.3 m but I am not sure which is proper to use, since I received different values depending on the bw that I use.
Question 1: Is there a specific bandwidth that should be used for Kcross.inhom(r)?
Question 2: Is there a mistake in the script of the Kcross.inhom function or can I consider the graphs correct?
Thank you in advance for your help!