29.01.2015 Views

Analysing spatial point patterns in R - CSIRO

Analysing spatial point patterns in R - CSIRO

Analysing spatial point patterns in R - CSIRO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

20.1 Envelopes and Monte Carlo tests 133<br />

Clearly, the K-function estimated from thecells data lies outside the typical range of values<br />

of the K-function for a completely random pattern.<br />

To conclude formally that there is a ‘significant’ difference between ̂K and K pois , we use<br />

the language of hypothesis test<strong>in</strong>g. Our null hypothesis is that the data <strong>po<strong>in</strong>t</strong> pattern is a<br />

realisation of complete <strong>spatial</strong> randomness. The alternative hypothesis is that the data pattern<br />

is a realisation of another, unspecified <strong>po<strong>in</strong>t</strong> process.<br />

20.1.2 Monte Carlo tests<br />

A Monte Carlo test is a test based on simulations from the null hypothesis. The pr<strong>in</strong>ciple was<br />

orig<strong>in</strong>ated <strong>in</strong>dependently by Barnard [18] and Dwass [39]. It was applied <strong>in</strong> <strong>spatial</strong> statistics<br />

by Ripley [54, 56] and Besag [22, 23]. See also [41]. Monte Carlo tests are a special case of<br />

randomisation tests which are commonly used <strong>in</strong> nonparametric statistics.<br />

Suppose the reference curve is the theoretical K function for CSR. Generate M <strong>in</strong>dependent<br />

simulations of CSR <strong>in</strong>side the study region W. Compute the estimated K functions for each of<br />

these realisations, say ̂K (j) (r) for j = 1,... ,M. Obta<strong>in</strong> the <strong>po<strong>in</strong>t</strong>wise upper and lower envelopes<br />

of these simulated curves,<br />

L(r) = m<strong>in</strong><br />

j<br />

U(r) = max<br />

j<br />

̂K(j) (r)<br />

̂K (j) (r).<br />

For any fixed value of r, consider the probability that ̂K(r) lies outside the envelope [L(r),U(r)]<br />

for the simulated curves. If the data came from a uniform Poisson process, then ̂K(r) and<br />

̂K (1) (r),... , ̂K (M) (r) are statistically equivalent and <strong>in</strong>dependent, so this probability is equal<br />

to 2/(M + 1) by symmetry. That is, the test which rejects the null hypothesis of a uniform<br />

Poisson process when ̂K(r) lies outside [L(r),U(r)], has exact significance level α = 2/(M + 1).<br />

Instead of the <strong>po<strong>in</strong>t</strong>wise maximum and m<strong>in</strong>imum, one could use the <strong>po<strong>in</strong>t</strong>wise order statistics<br />

(the <strong>po<strong>in</strong>t</strong>wise kth largest and k smallest values) giv<strong>in</strong>g a test of exact size α = 2k/(M + 1).<br />

20.1.3 Envelopes <strong>in</strong> spatstat<br />

In spatstat the function envelope computes the <strong>po<strong>in</strong>t</strong>wise envelopes.<br />

> data(cells)<br />

> E E<br />

Po<strong>in</strong>twise critical envelopes for K(r)<br />

Edge correction: iso<br />

Obta<strong>in</strong>ed from 39 simulations of CSR<br />

Significance level of <strong>po<strong>in</strong>t</strong>wise Monte Carlo test: 2/40 = 0.05<br />

Data: cells<br />

Function value object (class fv)<br />

for the function r -> K(r)<br />

Entries:<br />

id label description<br />

-- ----- -----------<br />

r r distance argument r<br />

Copyright<strong>CSIRO</strong> 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!