assigning a value to the points realized in a point pattern on a network

50 views Asked by At

I am thinking about a possibility with spatstat package in R. When I generate a point process on a linear network (uniform or poisson), is it possible to have the process assign a value (mark) to the generated point? For example: if I use uniform process for 3 points (p1, p2, p3) on the whole network, can I somehow generate a value to assign to this point? So, apart from x,y of each point p; can I generate a mv (markvalue) for each point such that p1 has x1,y1, mv1 or p2 has x2,y2, mv2. Preferably being able to state the range of mv to be between values [a,b]

I do not know how this would be called scientifically and therefore may be I am missing keywords to look in the Baddeley et al textbook on point process by CRC.

Could someone put me onto a correct path to do something like this :)

Thanks

1

There are 1 answers

3
Ege Rubak On BEST ANSWER

Yes, spatstat allows for marked point patterns on a linear network. You simply assign the vector of marks after you have generated the points:

library(spatstat)
a <- 1; b <- 2
X <- rpoislpp(5, simplenet)
marks(X) <- runif(npoints(X), a, b)