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.

24 Introduction to spatstat<br />

X<br />

7 3 6 5<br />

5 9 7 7<br />

4 3 6 9<br />

Another common example is Ripley’s K function. I’ll expla<strong>in</strong> more about the K function<br />

later. For now, we’ll just demonstrate how easy it is to compute and plot it. To compute the K<br />

function for a <strong>po<strong>in</strong>t</strong> pattern X, type Kest(X). This returns an object which can be plotted.<br />

> K plot(K)<br />

K<br />

K(r)<br />

0 500 1000 1500<br />

iso<br />

trans<br />

border<br />

theo<br />

0 5 10 15 20<br />

r (one unit = 0.1 metres)<br />

In this plot, the empirical K function (solid l<strong>in</strong>es) deviates from the theoretical expected<br />

value assum<strong>in</strong>g the <strong>po<strong>in</strong>t</strong>s are completely random (dashed l<strong>in</strong>es). To test whether this deviation<br />

is statistically significant, the standard approach is to use a Monte Carlo test based on envelopes<br />

of the K function obta<strong>in</strong>ed from simulated <strong>po<strong>in</strong>t</strong> <strong>patterns</strong>. In spatstat this is done with the<br />

envelope function:<br />

> E plot(E)<br />

Copyright<strong>CSIRO</strong> 2010

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

Saved successfully!

Ooh no, something went wrong!