[R-sig-Geo] Complete spatial randomness testing

Cenk İÇÖZ cicoz at anadolu.edu.tr
Sun Oct 2 16:24:50 CEST 2016



Hi Rolf,

Thanks for the reply.

A) I updated my R version and spatstat package. Currently  using  spatstat 1.46-1 spoiler alert and  3.3.1 version of R.

B) Yes the distributions of interpoint distancess. Sorry to mention it wrong. In some sources they call distance based tests on complete spatial randomness. 

C)  Again yes. dp1  is a class of ppp object of spatstat constructed like this.  
Latitude and longtitude and the specific window of the study area. 

dp1<-ppp(veri$Enlem, veri$Boylam, c(30,40), c(39,42))

D) I also tried constructing the plot with a simulated pattern. No problem in plotting the graph.

E) I performed the function Jest and plotted it . I took the same error message again unfortunately.

"""Error: in Fest(X, r) the successive r values must be finely spaced: given spacing = 0.010196; required spacing <=  0.00586""""

My question is that I have duplicated points of earthquake occurrences in the study area. Is it a problem related to  it?
 Or the spacing is too low to draw the plot that function can not manage to draw  it such a short distance. 

Thanks again all for the all help .

-----
Res. Asst Cenk Icoz
Anadolu University, Department of statistics, Turkey

________________________________________
Kimden: Rolf Turner [r.turner at auckland.ac.nz]
Gönderildi: 02 Ekim 2016 Pazar 00:29
Kime: Cenk İÇÖZ
Bilgi: r-sig-geo at r-project.org; Adrian.Baddeley at curtin.edu.au; Ege Rubak
Konu: Re: [R-sig-Geo] Complete spatial randomness testing

On 02/10/16 02:02, Cenk İÇÖZ via R-sig-Geo wrote:
> Hi friends,
>
> I have a point pattern that consist of earthquake locations.  I want 
> to test the pattern for complete spatial randomness based on distance 
> functions. I was using spatstat package allstats function to plot 4 of 
> them together in a graph  however I took this error message:
>
>
> "  Error in plot(allstats(dp1)) : error in evaluating the argument 'x' 
> in selecting a method for function 'plot': Error: in Fest(X, r) the 
> successive r values must be finely spaced: given spacing =
> 0.010196; required spacing <=  0.00586   "
>
>
> Is it something related to plotting window properties? Although I got 
> an error about F function , I could plot it individually. In addition 
> I could plot  all G, F, K  and L functions together in a graph 
> manually. Also I could not find a function to estimate J function in 
> spatstat package. It is only included in allstat function.
>
> Thanks in advance .

(a) What version of spatstat are you using?  It may be out of date.  The version of spatstat currently on CRAN is 1.46-1.

(b) When you say "based on distance functions" I presume that you mean "based on various distributions of interpoint distances".

(c) I presume that "dp1" is the point pattern (object of class "ppp") of earthquake locations.

(d) You have not provided a reproducible example of your problem.
Consequently I checked things out with a simulated example:

set.seed(42)
X <- rpoispp(100)
plot(allstats(X))

This ran with no problem, and produced the expected plot.

(e) The function to estimate the J function is Jest().  It has been in the spatstat package for a very long time.

cheers,

Rolf Turner

--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-sig-Geo mailing list