Date: Fri, 28 May 2010 10:00:35 +1200
From: Rolf Turner <r.turner at auckland.ac.nz>
To: Quets Jan <Jan.Quets at ua.ac.be>
Cc: "r-sig-geo at stat.math.ethz.ch" <r-sig-geo at stat.math.ethz.ch>
Subject: Re: [R-sig-Geo] existance of a specific non-overlapping
marked spatial model in spatstat or other R package?
Message-ID: <B9268B92-B6F4-420C-AF04-EEE1DA182F67 at auckland.ac.nz>
Content-Type: text/plain; charset="us-ascii"
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
######################################################################