Docsity

Analyzing Point Patterns: K-Function and Clustering in Spatial Data - Prof. T. Smith, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
NOTEBOOK FOR SPATIAL DATA ANALYSIS Part I. Spatial Point Pattern Analysis
______________________________________________________________________________________
________________________________________________________________________
ESE 502 I.4-1 Tony E. Smith
4. K-Function Analysis of Point Patterns
In the Bodmin Tors example above, notice from Figure 3.14a (p.20) that the clustering
structure is actually quite different from that of the Redwood Seedling example in Figure
3.12a (p.12). Rather than small isolated clumps, there appear to be two large groups of
points in the northwest and southwest, separated by a large empty region. Moreover, the
points within each group are actually quite evenly spaced (locally dispersed). These
observations suggest that the pattern of tors exhibits different structures at different
scales. Hence the objective of the present section is to introduce a method of point pattern
analysis that takes such scale effects into account, and in fact allows “scale” to become a
fundamental variable in the analysis.
4.1 Wolf-Pack Example
To motivate the main ideas, we begin with a new example involving wolf packs. A map
is shown in Figure 4.1a below representing the relative locations of wolf packs in a
portion of the Central Arctic Region in 1998.1 The enlarged portion in Figure 4.1b is a
schematic map depicting individual wolves in four of these packs.
Fig.4.1a. Map of Wolf Packs Fig.4.1b. Enlarged Portion
At the level of individual wolf locations in Figure 4.1b, there is a pattern of isolated
clumps that bears a strong resemblance to that of the Redwood seedlings above.2
Needless to say, this pattern would qualify as strongly clustered. But if one considers the
larger map in Figure 4.1a, a different picture emerges. Here, the dominant feature is the
remarkable dispersion of wolf packs. Each pack establishes a hunting territory large
enough for its survival (roughly 15 to 20 km in diameter), and actively discourages other
1 This map is based on a more detailed map published in the Northwest Territories Wolf Notes, Winter
1998/99. See also http://www.nwtwildlife.rwed.gov.nt.ca/Publications/wolfnotes/wolf32.htm.
2 The spacing of individual wolves is of course exaggerated to allow a representation at this scale.
•
•
•
• • •
•
•
•
•
•
•
⋅ ⋅
0 50 km
•
•
•
•
•
•
•
•
•
•
•
•
Wolf packs
•
•
•
•
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e

Partial preview of the text

Download Analyzing Point Patterns: K-Function and Clustering in Spatial Data - Prof. T. Smith and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

________________________________________________________________________

4. K-Function Analysis of Point Patterns

In the Bodmin Tors example above, notice from Figure 3.14a (p.20) that the clustering structure is actually quite different from that of the Redwood Seedling example in Figure 3.12a (p.12). Rather than small isolated clumps, there appear to be two large groups of points in the northwest and southwest, separated by a large empty region. Moreover, the points within each group are actually quite evenly spaced (locally dispersed). These observations suggest that the pattern of tors exhibits different structures at different scales. Hence the objective of the present section is to introduce a method of point pattern analysis that takes such scale effects into account, and in fact allows “scale” to become a fundamental variable in the analysis.

4.1 Wolf-Pack Example

To motivate the main ideas, we begin with a new example involving wolf packs. A map is shown in Figure 4.1a below representing the relative locations of wolf packs in a portion of the Central Arctic Region in 1998.^1 The enlarged portion in Figure 4.1b is a schematic map depicting individual wolves in four of these packs.

Fig.4.1a. Map of Wolf Packs Fig.4.1b. Enlarged Portion

At the level of individual wolf locations in Figure 4.1b, there is a pattern of isolated clumps that bears a strong resemblance to that of the Redwood seedlings above. 2 Needless to say, this pattern would qualify as strongly clustered. But if one considers the larger map in Figure 4.1a, a different picture emerges. Here, the dominant feature is the remarkable dispersion of wolf packs. Each pack establishes a hunting territory large enough for its survival (roughly 15 to 20 km in diameter), and actively discourages other

(^1) This map is based on a more detailed map published in the Northwest Territories Wolf Notes , Winter

1998/99. See also http://www.nwtwildlife.rwed.gov.nt.ca/Publications/wolfnotes/wolf32.htm. (^2) The spacing of individual wolves is of course exaggerated to allow a representation at this scale.

  • (^) •
  • •

⋅ ⋅

0 50 km

Wolf packs

________________________________________________________________________

packs from invading its territory.^3 Hence this pattern of wolf locations is very clustered at small scales , and yet very dispersed at large scales.

But if one were to analyze this wolf-location pattern using any of the nearest-neighbor techniques above, it is clear that only the small-scale clustering would be detected. Since each wolf is necessarily close to other wolves in the same dens, the spacing between dens would never be observed. In this simple example one could of course redefine wolf dens to be aggregate “points”, and analyze the spacing between these aggregates at a larger scale. But there is no way to analyze multiple scales using nearest neighbors without some form of re-aggregation.^4

4.2 K-Function Representations

To capture a range of scales in a more systematic way, we now consider what amounts to an extension of the quadrat (or cell-count) method discussed in section 1 above. In particular, recall that the quadrat method was criticized for being too dependent on the scale of individual cells. Hence the key idea of K-functions is to turn this dependency into a virtue by explicitly incorporating “scale” as a variable in the analysis. Thus, rather than fixing the scale and locations of cell grids, we now consider randomly sampled cells of varying sizes. While many sampling schemes of this type can be defined, we shall focus on the single most basic scheme which is designed to answer the following

question for a given point process with density λ : What is the expected number of point

events within distance h from any randomly sampled point event? Note that this expected

number is not very meaningful without specifying the point density, λ , since it will of

course increase with λ. Hence if we divide by λ in order to eliminate this obvious

“density effect” then the quantities of interest take the form:

(4.2.1) K h ( ) =^1 λ E (number of additional events within distance, h , of an arbitrary event)

If we allow the distance or scale , h , to vary then expression (4.2.1) is seen to define a function of h , designated as a K-function.^5 As with nn-distances, these values, K h ( ) ,

yield information about clustering and dispersion. In the wolf-pack example above, if one were to define K h ( ) with respect to small distances, h , around each wolf in Figure 4.1b,

then given the close proximity to other wolves in the same pack, these values would surely be too high to be consistent with CSR for the given density of wolves in this area. Similarly, if one were to define K h ( ) with respect to much larger distances, h , around

each wolf in Figure 4.1a, then given the wide spacing between wolf packs (and the relative uniformity of wolf-pack sizes^6 ), these values would surely be too low to be

(^3) Since wolves are constantly on the move throughout their hunting territories, the actual locations shown in

Figure 1a are roughly at the centers of these territories. (^4) One could also incorporate larger scales by using higher-order nearest neighbors [as discussed for

example in Ripley (1996, sec.6.2)]. But these are not only more complex analytically, they are difficult to associate with specific scales of analysis. (^5) This concept was popularized by the work of Ripley (1976,1977). Note also that following standard

convention, we now denote distance by (^) h to distinguish it from nn-distance, (^) d. (^6) Wolf packs typically consist of six to eight wolves (see the references in footnote 1 above).

________________________________________________________________________

events occur in specific environments (such as the patterns of Philadelphia housing abandonments in Figures 1.4 and 1.5), then the relevant distances might be determined by these environments (such as travel distance on the Philadelphia street system).^8

Finally, it is important to emphasize that the expected value in (4.2.1) is a conditional expected value. In particular, given that there is a point event, s , at the center of the circle in Figure 4.2 above, this value gives the expected number of additional points in this circle. This can be clarified by rewriting K h ( ) in terms of conditional expectations.

In particular if [as in Section 3.2.1 above] we now denote the circle in Figure 4.2 minus its center by

(4.2.3) Ch − { } s = { v ∈ R : 0 < d v s ( , ) ≤ h }

then K h ( ) can be written more precisely as follows:

(4.2.4) K h ( ) = (^1) λ E N C [ ( (^) h − { }) | s N s ( ) =1]

To see the importance of this conditioning, recall from expression (2.3.4) that for any stationary process (not just CSR processes) it must be true that the expected number of points in Ch − { } s is simply proportional to its area, i.e., that

(4.2.5) E C ( h − { }) s = λ a C ( h −{ }) s

But this is not true of the conditional expectation above. Recall from the wolf-pack case, for example, that for small circles around any given wolf, the expected number of additional wolves is much larger than what would be expected based on area alone [i.e.,is

larger than λ a C ( h − { }) s ]. These ideas will be developed in more detail in Section 4.4,

where it is shown that such deviations from simple area proportionality form the basis for all K-function tests of the CSR Hypothesis.

4.3 Estimation of K-Functions

Given this general definition of K-functions as (conditional) expected values, we now consider the important practical question of estimating these values. To do so, we introduce the following notation analyzing for point counts. For any given realized point pattern, Sn = ( si : i = 1,.., n ), and pair of points si , s (^) j ∈ Sn we now denote the Euclidean

distance between them by

(4.3.1) dij = d s ( (^) i , sj )

and for any distance, h , define the indicator function , I (^) h , for point pairs in S (^) n by

(^8) Here it should be noted that tools are available in the spatial analyst extension of ARCMAP for

constructing cost-weighted and shortest-paths distances. However, we shall not do so in this NOTEBOOK.

________________________________________________________________________

( ) [ ( , )]

ij h ij h i j ij

d h I d I d s s d h

⎧^ ≤

From this definition it follows at once that for any given point si ∈ Sn , the total number of

additional points s j within distance h of si is given by the sum Σ j ≠ i Ih ( dij ). Hence, if i

now refers to a randomly selected point generated by a point process on R , and if both the number and locations of points in R are treated as random variables, then in terms of (4.3.2) the K-function in (4.2.1) above can now be given the following equivalent definition:

(4.3.3) K h ( ) = (^1) λ E ⎡⎣^ ∑ j ≠ iI (^) h ( dij )⎤⎦

Observe also that for stationary point processes the value of K h ( ) must be independent

of the particular point event i chosen. So multiplying through by λ in (4.3.3) and

summing over all point events i = 1,.., n in region R , it follows that

n E ⎡⎣^ ∑ (^) j ≠ i I (^) h dij ⎤⎦^ = λ K h i = n ⇒ (^) ∑ (^) i = E ⎡⎣^ ∑ j ≠ iI (^) h dij ⎤⎦= n λ K h

1 ( ) 1^ n ( ) ⇒ K h = (^) λ n ∑ (^) i = E ⎡⎣^ ∑ j ≠ iI (^) h dij ⎤⎦

This “pooled” version of K h ( ) motivates the following pooled estimate of K h ( ) ,

designated as the sample K-function ,

n K h = (^) λ n ∑ ∑ i = j ≠ iIh dij

where again, λˆ = n a R / ( ).^9 The advantage of this estimator is that uses all points of the

given realized point pattern Sn in R. To interpret K h ˆ ( ) , note that if we rewrite (4.3.5) as

(4.3.6) ˆ ( ) (^1) ˆ^11 ( ( ))

n K h (^) λ n i = j ≠ iI (^) h dij = ⎡^ ⎤ ⎣ ∑^ ∑ ⎦

then the expression in brackets is seen to be simply an average of the relevant point counts for each of the pattern points, si ∈ Sn. Hence, if the underlying process were truly

stationary (and edge effects were small) then this sample K-function would be

(^9) At this point it should be noted that our notation differs from [BG] where regions are denoted by a script

R with area R. Here we use R for region, and make the area function, a R ( ) , explicit. In these terms, (4.3.5)

is seen to be identical to the estimate on the top of p. 93 in [BG], where 1/( λˆ n ) = a R ( ) / n^2.

________________________________________________________________________

to the edge, thus inflating K h ˆ ( ) to correct the bias. [An explicit derivation of Ripley’s

correction in given in Section 6 of the Appendix to Part I.]

It should be emphasized that while Ripley’s correction is very useful for estimating the true K-function for a given stationary processes, this is usually not the question of most interest. As we have seen above, the key questions relate to whether this process exhibits structure other than what would be expected under CSR, and how this structure may vary as the spatial scale of analysis is increased. Here it turns out that in most cases, Ripley’s correction is not actually needed. Hence this correction will not be used in the analysis to follow. 11

4.4 Testing the CSR Hypothesis

To apply K-functions in testing the CSR Hypothesis, it is convenient to begin by ignoring edge effects, and considering the nature of K-functions under this hypothesis for points, s ∈ R and distances, h , that are not influenced by edge effects. Hence, in contrast to Figure 4.3a above, we now assume that the set of locations, Ch , within distance h of s is

entirely contained in R , i.e., that

(4.4.1) Ch = { v ∈ R : d s v ( , ) ≤ h } ⊆ R

Next recall from the basic independence assumption about individual point locations in CSR processes (Section 2.2 above) that for such processes, the expected number of points in Ch − { } s does not dependent on whether or not there is a point event at s , so that

(4.4.2) E N C [ ( (^) h − { }) | s N s ( ) = 1] = E N C [ ( (^) h −{ })] s

Hence from expression (4.2.3), together with the area formula for circles [and the fact that a C ( (^) h − { }) s = a C ( (^) h )], it follows that

(4.4.3) E N C [ ( h − { }) | s N s ( ) = 1] = λ a C ( h − { }) s = λ a C ( h )=λπ h^2

which together with expression (4.2.4) yields the following simple K-function values:

(4.4.4) K h ( ) = 1 λ ( λπ h^2 )=π h^2

Thus by standardizing with respect to density, λ , and ignoring edge effects as in (4.4.1),

we see that the K-function reduces simply to area under the CSR Hypothesis. Note also

that when K h ( ) > π h^2 , this implies a mean point count higher than would be expected

under CSR, and hence indicates some degree of clustering at scale h (as illustrated in

(^11) Readers interested in estimating the true K-function for a given process are referred to Section 8.4.3 in

Cressie (1993), and to the additional references found therein.

________________________________________________________________________

Section 4.2 above). Similarly, a value K h ( ) < π h^2 implies a mean point count lower than

would be expected under CSR, and hence indicates some degree of dispersion at scale h. Thus for any given h > 0 ,

K h ( ) > π h^2 ⇒ clustering at scale h

K h ( ) < π h^2 ⇒ dispersion at scale h

While these relations are adequate for testing purposes, area values are difficult to interpret directly. Hence it usually convenient to further standardize K-functions in a manner that eliminates the need for considering these values. If for each h we let

K h L h h

then under CSR, this L-function has the property that

2 ( ) 0

h L h h h h

for all h ≥ 0. In other words, this associated L-function is identically zero under CSR. Moreover, since L h ( ) is an increasing function of K h ( ) , it follows that L h ( ) is positive

exactly when K h ( ) > π h^2 , and is negative exactly when K h ( ) < π h^2. Hence the relations

in (4.4.5) can be given the following simpler form in terms of L-functions:

L h ( ) > 0 ⇒ clustering at scale h

(4.4.8) L h ( ) < 0 ⇒ dispersion at scale h

Given the estimate, K h ˆ ( ) , in (4.3.7) above, one can estimate L h ( ) by

L h ˆ( ) K h h

and can in principle use (4.4.8) to test for clustering or dispersion.

4.5 Bodmin Tors Example

We can apply these testing ideas to Bodmin by using the MATLAB program, k_function.m. The first few lines of this program are shown below:

________________________________________________________________________

One approach is suggested by recalling that random point pattern for Bodmin was also generated in Figure 3.14b above. Hence if the L-function for such a random pattern is plotted, then this can serve as a natural benchmark against which to compare the L- function for tors. This random pattern is contained in the matrix, Bod_rn2 , of data file Bodmin.mat (and is also shown again in Figure 4.7 below). Hence the corresponding command, k_function(Bod_rn2,area,20,2) , now yields a comparable plot of this benchmark L-function as shown in Figure 4.5 below.

Here it is clear that the L-function for this random pattern is not flat , but rather is everywhere negative, and decreases at an increasing rate. Hence relative to zero, this pattern appears to exhibit more and more dispersion as the scale increases.

The reason for this of course is that the theory above [and expression (4.4.1) in particular] ignores those points near the boundary of the Bodmin region, such as the point shown in Figure 4.7. Here it is clear that for sufficiently

small scales, h , there is little effect on L h ˆ( ) ,

so that values are close to zero for small h. But as this radius increases, it is also clear that most of the circle is eventually outside of R , and hence is mostly empty. Thus, given the

estimated point density, λˆ , for Bodmin tors

inside R , point counts for large h start to look

very small relative to the area π h^2. This is

precisely the effect that Ripley’s correction [expression (4.3.7)] attempts to eliminate.^12

(^12) A nice comparison of Ripley’s correction with uncorrected L-functions (such as in Figure 4 above) is

given in Figure 8.15 of Cressie (1993, p.617).

-12 0 2 4 6 8 10 12 14 16 18 20

0

2

-12 0 2 4 6 8 10 12 14 16 18 20

0

2

L L

h

Relative Clustering

h

Fig.4.5. Random L-function (^) Fig.4.6. L-function Overlay

Fig.4.7. Bodmin Edge Effect

________________________________________________________________________

But if we now ignore the zero reference line and use this random L-function as a benchmark, then a perfectly meaningful comparison can be made by overlaying these two L-functions, as in Figure 4.6 above. Here one can see that the region of relative clustering is now considerably larger than in Figure 4.4, and occurs up to a scale of about h = 8 (see the scale shown in Figure 3.14). But observe even these benchmark comparisons have little meaning at scales so large that circles of radius h around all pattern points lie mostly outside the relevant region R. For this reason, the commonly accepted rule-of- thumb is that for any given point pattern, Sn , one should not consider h -values larger

that half the maximum pairwise distance between pattern points. Hence if we now denote

the maximum pairwise distance for Sn by, h max (^) = max{ ( d s (^) i , s (^) j ) : si , s (^) j ∈ Sn }, and use h to

indicate the largest value of h to be considered in a given case, then the standard rule-of- thumb is to set

(4.5.1) h = h max / 2

This corresponds to option 1 for input (iv) of k_function above, and option 2 correspond

to h = h max. We shall have occasion to use (18) in many of our subsequent analyses, and

in fact this will usually denote the “default” value of h.

A more important limitation of this benchmark comparison is that (like the JMPIN version of the Clark-Evans test in Section 3.3.1 above) the results necessarily depend on the random point pattern that is chosen for a benchmark. Hence we now consider a much more powerful testing procedure using Monte Carlo methods.

4.6 Monte Carlo Testing Procedures

As we saw in Section 3.5 above, it is possible to use Monte Carlo methods to estimate the sampling distribution of nn-distances for any pattern size in a given region of interest. This same idea extends to the sampling distribution of any statistics derived from such patterns, and is of sufficient importance to be stated as a general principle:

SIMULATION PRINCIPLE: To test the CSR Hypothesis for any point pattern, S , of sizen n in a given region, R, one can simulate a large number of random point patterns, { Sn ( ) i : i = 1,.., N } , of the same size, and compare Sn with this statistical population.

Essentially, this simulation procedure gives us a clear statistical picture of what realized patterns from a CSR process on R should look like. In the case of K-function tests of CSR, we first consider the standard application of these ideas in terms of “simulation envelopes”. This method is then refined in terms of a more explicit P-value representation.

________________________________________________________________________

significance of L ˆ( ) ⋅. This plot in fact summarizes a series of statistical tests at each scale of analysis, h ∈ H. In the case illustrated, if we consider any h under the blue area in Figure 4.8, then by definition, L h ˆ( ) > U (^) N ( ) h. But if pattern S (^) n were just another sample from this population of random patterns, then every sample value { ( ), L h ˆ^ L h ˆ 1 ( ),.., L ˆ N ( )} h would have the same chance of being the biggest. So the chance that L h ˆ( ) is the biggest is only 1/( N +1). More formally, if pattern Sn is consistent with the CSR Hypothesis then:

ˆ^1

Pr[ ( ) ( )] , N 1 L h h h H N

U

ˆ^1

Pr[ ( ) ( )] , 1

L h (^) N h h H N

L

These probabilities are thus seen to be precisely the P-values for one-tailed tests of the CSR Hypothesis against clustering and dispersion , respectively. For example, if N = 99 [as in step (i) above] then the chance that L h ˆ( ) > U (^) N ( ) h is only 1/(99 + 1) = .01. Hence at scale, h , one can infer the presence of significant clustering at the .01 -level. Similarly, if there were any h ∈ H with L h ˆ( ) < L (^) N ( ) h in Figure 4.8, then at this scale one could infer the presence of significant dispersion at the .01 - level. Moreover, higher levels of significance could easily be explored by simulating larger numbers of random patterns, say N = 999.

This Monte Carlo test can be applied to the Bodmin example by using the MATLAB program, k_function_sim.m , shown below.

function k_function_sim(loc,area,b,extent,sims,poly)

% K_FUNCTION_SIM computes the k-Function for a point % pattern plus N random point patterns for a single polygon and % plots the normalized L-Function plus Upper and Lower envelopes

% INPUTS: % (i) loc = file of locations (xi,yi), i=1..n % (ii) area = area of region % (iii) b = number of bins to use in CDF (and plot) % (iv) extent = 2 if max h = max pairwise distance to be considered % = 1 if max b = half of max pairwise distance (typical case) % (v) sims = number of simulated random patterns % (vi) poly = polygon boundary file

________________________________________________________________________

Note that the two key additional inputs are the numbers of simulations (here denoted by sims rather that N ) and the boundary file, poly , for the region, R. As with the program, clust_sim , in Section 3.5 above, poly is needed in order to generate random points in R.

To apply this program to Bodmin with sims = 99, be sure the data file, Bodmin.mat , in open in the Workspace, and write:

>> k_function_sim(Bodmin,area,20,1,99,Bod_poly);

The results of this program are shown in Figure 4.9 to the right. Notice first that there is again some clustering, and that now it can be inferred that this clustering is significant at the .01-level ( N = 99 ). Notice also that the range of significant clustering is considerably smaller that that depicted in Figure 4.6 above. This will almost always be the case, since here the L h ˆ( ) values must be bigger that 99 other random values, rather than just one “benchmark” value. Notice also that this scale, roughly 1.5 ≤ h ≤ 4.5, appears to be more consistent with Figure 3.14a.

However, this approach is still rather limited in the sense that it provides information only about the relation of L h ˆ( ) to the maximum and minimum simulated values U (^) N ( ) h and L N (^) ( ) h for each h ∈ H. Hence the following refinement of this approach is designed to make fuller use of the information obtained from the above Monte Carlo procedure.

4.6.2 Full P-Value Approach

By focusing on the maximum and minimum values, U (^) N ( ) h and L N (^) ( ) h for each h ∈ H , the only P-values that can be obtained are those in (4.6.3) and (4.6.4) above. But it is clear for example that values of L h ˆ( ) that are just below U (^) N ( ) h are probably still very significant. Hence a natural extension of the above procedure is to focus directly on P-values for clustering and dispersion, and attempt to estimate these values on the basis of the given samples. Turning first to clustering, the appropriate P-value is given by the answer to the following question: If the observed pattern were coming from a CSR process in region R, then how likely it would be to obtain a value as large as L h ˆ( )? To answer this question let the observed L-value be denoted by l 0 (^) = L h ˆ( ), and let the random variable, LCSR ( ) h , denote the L-value (at scale h ) obtained from a randomly sampled CSR pattern of size n on R. Then the answer to the above question

-3 0 1 2 3 4 5 6 7 8 9

-2.

-1.

-0.

0

1

Fig.4.9. Bodmin Envelope Test

________________________________________________________________________

this L-value is still sufficiently large to imply some significant degree of clustering. Such examples show that the P-values in (4.6.8) are considerably more informative than the simple envelopes above.

Turning next to dispersion , the appropriate P-value is now given by the answer to the following question: If the observed pattern were coming from a CSR process in region R, then how likely it would be to obtain a value as small as L h ˆ( )? The answer to this question is given by the dispersion P-value , Pdispersed ( ) h , at scale h for the observed pattern, S (^) n :

(4.6.9) Pdispersed ( ) h = Pr[ LCSR ( ) h ≤ l 0 ]

Here, if we let m (^) − ( l 0 )denote the number of simulated L-values that are no larger than l 0 , then exactly the same argument above [with respect to the event “ LCSR ( ) h ≤ l 0 ”] now shows that the appropriate relative-frequency estimate of Pdispersed ( ) h , is given by

ˆ (^ )^1

dispersed

m l P h N

= −^ +

To apply these concepts, observe first that (unless many li values are the same as l 0 )^15 it must be true that P ˆ dispersed^ ( ) h ≈ 1 − P ˆ clustered ( ) h. So there is generally no need to compute both. Hence we now focus on clustering P-values, P ˆ clustered^ ( ) h for a given point pattern, S n , in region R. Observe next that to determine P ˆ clustered^ ( ) h , there is no need to use L- values at all. One can equally well order the K-values. In fact, there is no need to

normalize by λˆ since this value is the same for both the observed and simulated

patterns. Hence we need only compute “raw” K-function values, as given by the bracketed part of expression (4.3.6). Finally, to specify an appropriate range of scales to be considered, we take the appropriate maximum value of h to be the default value h = h max / 2 in (4.5.1), and specify a number b of equal divisions of h. The values of P ˆ clustered^ ( ) h are then computed for each of these h values, and the result is plotted.

This procedure is operationalized in the MATLAB program, k_count_plot.m. This program will be discussed in more detail in the next section. So for the present, we simply apply this program to Bodmin (with Bodmin.mat in the Workspace), by setting N = 99 , b = 20 and writing:

>> k_count_plot(Bodmin, 99,20,1,Bod_poly);

(^15) The question of how to handle such ties is treated more explicitly in Section 7 of the Appendix to Part I.

________________________________________________________________________

(Simply ignore the fourth input “ 1 ” for the present.) The screen output of k_count_plot gives the value of h computed by the program, which in this case is Dmax/2 = 8.. The minimum pairwise distance between all pairs of points ( Dmin = 0.5203 ) is also shown. This value is useful for interpreting P-values at small scales, since all values of h less that this minimum must have K h ˆ ( ) = 0 and hence must be “maximally dispersed” by definition [since no simulated pattern can have smaller values of K h ˆ ( ) ].

The cluster P-value plot for Bodmin is shown in Figure 4.10. With respect to significant clustering, there is seen to be general agreement with the results of the envelope approach above. Here we see significant clustering at the. level (denoted by the lower dashed red line) for scale values in the range 1.3 ≤ h ≤ 6.1 (remember that one will obtain slightly different values for each simulation).^16 But this figure clearly shows more. In particular, clustering at scales in the range 1.7 ≤ h ≤ 5.7is now seen to be significant at the .01 level, which by definition the highest level of significance possible for N = 99.

Here it is also worth noticing that the clustering P-value at scale h = .5is so large (in fact .93 in the above simulation) that it shows weakly significant dispersion (where the upper dashed red line indicates significant dispersion at the .05 level). The statistical reason for this can be seen from the screen output that shows the minimum distance between any two tors to be .52. Hence at scale h = .5 it must be true that no circle of radius .5 about any tor can contain other tors, so that we must have K ˆ (.5) = 0. But since random point patterns such as in Figure 3.14b often have at least one pair of points this close together, it becomes clear that there is indeed some genuine local dispersion here. Further reflection suggests that is probably due to the nature of rock outcroppings, which are often only the exposed portion of larger rock formations and thus cannot be too close together. So again we see that the P-value map adds information about this pattern that may well be missed by simply visual inspection.

4.7 Nonhomogeneous CSR Hypotheses

As mentioned in Section 2.4 above, it is possible to employ the Generalized Spatial Laplace Principle to extend CSR to the case of nonhomogeneous reference measures.

(^16) Simulations with N = 999 yield about the same results as Figure 4.10, so this appears to be a more

accurate range than given by the envelope in Figure 4.9.

(^00 1 2 3 4 5 6 7 8 )

1

h

P-Values

h

P^ ˆ clustered^ ( )⋅

Fig.4.10. Bodmin Cluster P-Values

________________________________________________________________________

4.7.2 Monte Carlo Tests of Hypotheses

To test such hypotheses, we proceed exactly the same way as in the homogeneous case. The only real difference here is that the probability distributions corresponding to nonhomogeneous spatial hypotheses are somewhat more complex. Using the above example as an illustration, we can simulate samples of n random abandonments from the appropriate distribution by the following two-stage sampling procedure :

(i) Randomly sample a census tract, C 1 (^) i , from the distribution in (4.7.2).

(ii) Randomly locate a point s 1 ( ) i in C 1 (^) i.

(iii) Repeat (i) and (ii) n times to obtain a point pattern S ( ) ni^ = ( s ( ) ji : j = 1,.., n ).

The resulting pattern Sn ( ) i corresponds to the above hypothesis in the sense that individual abandonment locations are independent , and the expected number of

abandonments in each tract C j is proportional to the reference measure , H j = ρ( Cj ).

However, this reference measure ρ is only an approximation to the theoretical

measure, since the actual locations of individual housing units are not known. [This is typical of situations where certain key spatial data is available only at some aggregate level.^18 ] Hence in step (ii) the location of a housing units in Ci is taken to be uniformly (homogeneously) distributed throughout this subregion. The consequences of this

“local uniformity” approximation to the ideal reference measure, ρ , will be noted in

the numerical examples below.

Given a point pattern, S (^) n = ( s (^) j : j = 1,.., n ), such as the locations of n abandonments above, together with N simulated patterns { Sn ( ) i : i = 1,.., N } from the Monte Carlo procedure above, we are now ready to test the corresponding nonhomogeneous CSR hypothesis based on this reference measure ρ. To do so, we can proceed exactly as before by constructing K-counts, K h ˆ ( ) , for the observed pattern, Sn , over a selected range of scales, h , and then constructing the corresponding K-counts, K ˆ^ ( ) i ( ) h , for each simulated pattern, i = 1,.., N.

This procedure is operationalized in the same MATLAB program, k_count_plot (which is more general than the Bodmin application above). Here the only new elements involve a partition of region R into subregions, { Ci : i = 1,.., m }, together with a specification of the appropriate reference measure, ρ , defined on this set of subregions.

(^18) Such aggregate data sets will be treated in more detail in Part III of this NOTEBOOK.

________________________________________________________________________

!

!

!

!

! !

!

!

!

!

!

!

! !

!

!

!!

!

!

!

!

!

!

!

!

!

!!

!

!

! !

!

!

! (^)!

!

! !!

!

!

!

! !

!

!

!! !

! (^)!

!!

!

!

! !! !!

!

!

!

!

! !

! !

!!

!

!

!

!

!

!!

!

!

!

!

!

! !

!

!!

!

!

!

!

!

!

!

!

!

!

! (^)!

! !

!

!

!

!

!

!

!

!

!!

!

!

!

!

!!

! ! !

!!!

! !!

!

!

!

!

!

! (^)!!

!

!

!

!

! ! !

!

!

! (^)!

!

! ! !

! !!^!

! ! (^)!

! !!

!

!

!

!

! ! !

!

! (^)!

!

! !

!

!

!

! (^)! !

! (^) !!

! !

!

!!

!

!

!!

!

! ! !

!!

! !

4.7.3 Lung Cancer Example

To illustrate this testing procedure, the following example has been constructed from the Larynx and Lung Cancer example of Section 1.2 above. Here we focus only on Lung Cancer, and for simplicity consider only a random subsample of n = 100 lung cases, as shown in Figures 4.12 below.

Note from Figures 1.7 and 1.8 that this is fairly representative of the full data set ( lung cancers). To analyze this data set we begin by observing that in terms of area alone, the point pattern in Figure 4.12 is obviously quite clustered.

One can see this by comparison with a typical random pattern of the same size in Figure 4.13. This can be verified statistically by using the program k_function_plot (as in the Bodmin case) to conduct a Monte Carlo test for the homogenous case developed above. The results are shown in Figure 4.14 to the right. Here it is evident that there is extreme clustering. In fact, note from the scale in Figure 4.12 above that there is highly significant clustering up to a radius of h = 20 km , which is large enough to encompass the entire region. Notice also that the significance levels here are as high as possible for the given number of simu- lations, which in this case was N = 999. This appears to be due to the fact that the overall pattern of points in Figure 4.12 is not only more clustered but is also more compact. So for the given common point density in these figures, cell counts centered at pattern points in Figure 4.12 tend to be uniformly higher than in Figure 4.13.

Fig.4.12. Subsample of Lung Cases Fig.4.13. Random Sample of Same Size

(^0) • (^) • • 5 10 km

Fig.4.14. Test of Homogeneous Clustering

(^0 00 5000 10000 15000 )

h

P-Value