Skip to content
Prev 12686 / 29559 Next

Cross nearest neighbor distance

On 04/09/11 23:49, Alper ALTINOK wrote:
It is not clear to me just what you are trying to do and hence it is not
clear what (if any) the appropriate technique might be.   What do the
points actually consist of?  Are the points in the June pattern translations
(by varying amounts) of the points in the May pattern.  If so, it would seem
to me that you have a number of *trajectories* of points, observed at
``about 10'' (???) discrete times.  In which case point pattern analysis may
not be appropriate.

Be that as it may, you could apply the Kcross() function to your data by
combining your ``about 10'' patterns into a single pattern with marks
indicating the month in which the pattern was observed.  To combine the
patterns, use "superimpose()".  E.g. (triv. example with simulated data):

require(spatstat)
X <- list()
set.seed(42)
for(nm in month.abb) X[[nm]] <- rpoispp(100)
Y <- do.call(superimpose,X)
marks(Y) <- factor(marks(Y),levels=month.abb) # To get the months in the 
right order
kc <-alltypes(Y,fun="K")
plot(kc[1:4,1:4],title="Vacuous Example") # 12 x 12 makes the plots too 
small to be useful.

HTH

     cheers,

         Rolf Turner