[R] Convert from ppp to spp objects

Rolf Turner r.turner at auckland.ac.nz
Mon Nov 19 21:31:56 CET 2007


On 20/11/2007, at 9:00 AM, Honey Giroday wrote:

>
> Hi All!
>
> As a new useR, I am currently working in R 2.5.1 to produce  
> Ripley's L (the linear version of Ripley's K) for a spatial point  
> dataset (originally a ESRI shapefile).  I have coerced the data to  
> a ppp object (because I was originally using 'kest' in the spstat  
> package to produced Ripley's K) but I need to convert my spatial  
> data to a spp object to be able to use 'kfun' in the ads package  
> (this function calculates Ripley's L and confidence intervals).  I  
> have searched through help, forums, and package instructions to try  
> and find a way to convert a ppp object to a spp, but I have been  
> unable to find a command.  Is there a package/command that will let  
> me do this or will let me convert an ESRI point shapefile to an  
> spp.  Your help would be much appreciated and thank you for your  
> time in considering this issue.

I have not delved deeply into what the ads package does, but I  
strongly suspect that the
intervals calculated are ***NOT*** actually confidence intervals, but  
rather ***critical***
intervals.  The documentation, e.g. of kfun() refers to the ``number  
of Monte Carlo simulations
to estimate local confidence limits of the null hypothesis of  
complete spatial randomness''.

Since confidence limits have no null hypothesis associated with them,  
I infer that authors
are really talking about critical intervals.  (If the curve extends  
beyond the critical
intervals then one rejects the null hypothesis.)

This is a completely different concept from that of confidence  
interval, despite the superficial
similarity.  The difference is trivial if one stops and thinks about  
it, but that does not seem
to prevent the confusion from being widely propagated.

If indeed I am correct in supposing that the intervals in question  
are critical intervals, then
the same calculation can readily be effected in spatstat via the  
envelope() function.  There is
then no need to convert from ppp objects to spp objects.

		cheers,

			Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}



More information about the R-help mailing list