[R-sig-Geo] existance of a specific non-overlapping marked spatial model in spatstat or other R package?

Rolf Turner r.turner at auckland.ac.nz
Fri May 28 00:00:35 CEST 2010


On 28/05/2010, at 8:53 AM, Quets Jan wrote:

> 
> Hi,
> 
> I am looking for a specific non-overlapping marked spatial model for use as a null model for monte carle simulations with use of the 'envelope' function in spatstat.
> 
> the specific marked spatial model should:
> -----------------
> *generate a spatial random pattern with a predetermined number of points (with conditions set below)
> 
> *each point should be assigned a mark randomly out of a predetermined set of marks
> 
> *these marks represent the radia of circular discs which should be drawn around these points (which act as centres)
> 
> *no discs should overlap
> -----------------
> 
> Does anybody has knowledge of a such a built in model in spatstat or another R package?
> 
> For now, I have built this model by myself, but it turns out to have a very time-consuming running time, especially when used as a null model in a monte carlo simulation. Also I have multiple monte carlo simulations to perform.
> 
> It will be of great help,

The only way I can think of doing this is sequentially.  I.e. select a radius,
then repetitively select a point to add, rejecting the selected point if its
circle (with the chosen radius) intersects any of the existing circles.  If
after ``giveup'' attempts the function has failed to find an acceptable point,
it gives up (and throws an error).

I cobbled together some code to effect this; it took one minute of user time
to do 100 replications of choosing 100 points with non-overlapping circles
in the unit square, with the radii selected uniform-randomly from (1:5)/100
and giveup=1000.

I believe that it would require a lot of work and great cleverness to get
anything substantially faster.  Of course, I could be wrong --- I was once,
back in 1968 when I thought I'd made a mistake and I hadn't. :-)

	cheers,

		Rolf Turner

P. S.  Let me know if you want my code.  I suspect it's not much different
from what you have built yourself.

		R.
######################################################################
Attention: 
This e-mail message is privileged and confidential. If you are not the 
intended recipient please delete the message and notify the sender. 
Any views or opinions presented are solely those of the author.

This e-mail has been scanned and cleared by MailMarshal 
www.marshalsoftware.com
######################################################################



More information about the R-sig-Geo mailing list