Estimating the K-function for a univariate spatial point process on an arbitrary polygon.

Similar documents
Algebra Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard

4. How many integers between 2004 and 4002 are perfect squares?

Pre-Algebra Academic Content Standards Grade Eight Ohio. Number, Number Sense and Operations Standard. Number and Number Systems

Objective: To distinguish between degree and radian measure, and to solve problems using both.

Computational Geometry. Lecture 1: Introduction and Convex Hulls

Geometry Enduring Understandings Students will understand 1. that all circles are similar.

Algebra Geometry Glossary. 90 angle

CSU Fresno Problem Solving Session. Geometry, 17 March 2012

Copyright 2011 Casa Software Ltd. Centre of Mass

New York State Student Learning Objective: Regents Geometry

Math 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers.

Higher Education Math Placement

Area. Area Overview. Define: Area:

SAT Subject Math Level 1 Facts & Formulas

Florida Department of Education/Office of Assessment January Grade 6 FCAT 2.0 Mathematics Achievement Level Descriptions

Geometry. Higher Mathematics Courses 69. Geometry

WORK SCHEDULE: MATHEMATICS 2007

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

South Carolina College- and Career-Ready (SCCCR) Pre-Calculus

Postulate 17 The area of a square is the square of the length of a. Postulate 18 If two figures are congruent, then they have the same.

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

Geometry Chapter Point (pt) 1.1 Coplanar (1.1) 1.1 Space (1.1) 1.2 Line Segment (seg) 1.2 Measure of a Segment

GEOMETRY. Constructions OBJECTIVE #: G.CO.12

Solving Geometric Problems with the Rotating Calipers *

CHM 579 Lab 1: Basic Monte Carlo Algorithm

GEOMETRIC MENSURATION

Mean Value Coordinates

Geometry Unit 6 Areas and Perimeters

CHAPTER 8, GEOMETRY. 4. A circular cylinder has a circumference of 33 in. Use 22 as the approximate value of π and find the radius of this cylinder.

DEFINITIONS. Perpendicular Two lines are called perpendicular if they form a right angle.

Biggar High School Mathematics Department. National 5 Learning Intentions & Success Criteria: Assessing My Progress

56 questions (multiple choice, check all that apply, and fill in the blank) The exam is worth 224 points.

Glencoe. correlated to SOUTH CAROLINA MATH CURRICULUM STANDARDS GRADE 6 3-3, , , 4-9

Situation: Proving Quadrilaterals in the Coordinate Plane

GEOMETRY COMMON CORE STANDARDS

Topology. Shapefile versus Coverage Views

SAT Subject Math Level 2 Facts & Formulas

Circle Name: Radius: Diameter: Chord: Secant:

7.4A/7.4B STUDENT ACTIVITY #1

1.2 GRAPHS OF EQUATIONS. Copyright Cengage Learning. All rights reserved.

Spatial Data Analysis

2.3 WINDOW-TO-VIEWPORT COORDINATE TRANSFORMATION

Grade 7 & 8 Math Circles Circles, Circles, Circles March 19/20, 2013

Parallel and Perpendicular. We show a small box in one of the angles to show that the lines are perpendicular.

Arrangements And Duality

CAMI Education linked to CAPS: Mathematics

of surface, , , of triangle, 548 Associative Property of addition, 12, 331 of multiplication, 18, 433

North Carolina Math 2

1. A student followed the given steps below to complete a construction. Which type of construction is best represented by the steps given above?

Common Core Unit Summary Grades 6 to 8

Geometry 8-1 Angles of Polygons

Expression. Variable Equation Polynomial Monomial Add. Area. Volume Surface Space Length Width. Probability. Chance Random Likely Possibility Odds

Geometry Course Summary Department: Math. Semester 1

13. Write the decimal approximation of 9,000,001 9,000,000, rounded to three significant

NEW MEXICO Grade 6 MATHEMATICS STANDARDS

Baltic Way Västerås (Sweden), November 12, Problems and solutions

Largest Fixed-Aspect, Axis-Aligned Rectangle

Geometry and Measurement

alternate interior angles

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

MATHCOUNTS TOOLBOX Facts, Formulas and Tricks

ACT Math Facts & Formulas

Class One: Degree Sequences

Everyday Mathematics CCSS EDITION CCSS EDITION. Content Strand: Number and Numeration

Additional Topics in Math

Mathematical Conventions Large Print (18 point) Edition

Chapter 5: Working with contours

Mathematical Conventions. for the Quantitative Reasoning Measure of the GRE revised General Test

Everyday Mathematics GOALS

Solving Simultaneous Equations and Matrices

Example SECTION X-AXIS - the horizontal number line. Y-AXIS - the vertical number line ORIGIN - the point where the x-axis and y-axis cross

Conjectures for Geometry for Math 70 By I. L. Tse

ModuMath Basic Math Basic Math Naming Whole Numbers Basic Math The Number Line Basic Math Addition of Whole Numbers, Part I

PERIMETER AND AREA. In this unit, we will develop and apply the formulas for the perimeter and area of various two-dimensional figures.

Planar Curve Intersection

1 Solution of Homework

Creating a 2D Geometry Model

11.3 Curves, Polygons and Symmetry

MATH 095, College Prep Mathematics: Unit Coverage Pre-algebra topics (arithmetic skills) offered through BSE (Basic Skills Education)

MATHS LEVEL DESCRIPTORS

Final Review Geometry A Fall Semester

Conjunction is true when both parts of the statement are true. (p is true, q is true. p^q is true)

GEOMETRY CONCEPT MAP. Suggested Sequence:

Least-Squares Intersection of Lines

Solutions to Homework 10

Area of Parallelograms (pages )

EE602 Algorithms GEOMETRIC INTERSECTION CHAPTER 27

Monte Carlo tests for spatial patterns and their change a

COMMON CORE STATE STANDARDS FOR MATHEMATICS 3-5 DOMAIN PROGRESSIONS

Section 1: How will you be tested? This section will give you information about the different types of examination papers that are available.

Estimating the Average Value of a Function

with functions, expressions and equations which follow in units 3 and 4.

1 BPS Math Year at a Glance (Adapted from A Story of Units Curriculum Maps in Mathematics P-5)

Shortest Path Algorithms

Overview. Essential Questions. Grade 8 Mathematics, Quarter 4, Unit 4.3 Finding Volume of Cones, Cylinders, and Spheres

SURFACE AREA AND VOLUME

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Chapter 8 Geometry We will discuss following concepts in this chapter.

Understanding Basic Calculus

Unit 3: Circles and Volume

Transcription:

Estimating the K-function for a univariate spatial point process on an arbitrary polygon. B. S. Rowlingson & P. J. Diggle University of Lancaster, Lancaster, UK December 1991 Keywords: point process; spatial data. 1 Language Fortran 77 2 Description and Purpose One of the most useful summary descriptions of a spatial point pattern is an estimate of the reduced second moment measure, or K-function. The K-function of a stationary isotropic point process is K(r) = λ 1 E[ Number of further points within distance r of an arbitrary point of the process ]. where λ is the intensity, or expected number of points per unit area (Ripley, 1976,1977). For a set of data {x i : i = 1,..., n} consisting of n points in a planar region A, Ripley s estimator for K(r) is defined as follows. Let A denote the area of A, and d ij the distance between x i and x j. Let δ ij (r) = 1 if d ij < r, δ ij (r) = 0 otherwise. Define w(x, r) to be the reciprocal of the proportion of the circumference of the circle with centre x and radius r which is contained in A. Then, 1 ˆK(r) = n(n 1) A w ij δ ij (r) (1) i j 1

where w ij = w(x i, d ij ). See Figure 1 for an example in which A is a rectangle, w ij = 1 and w ji > 1. The estimator (1) is approximately unbiased for sufficiently small r. As r increases, so the value of w ij can become large until, eventually, w ij becomes unbounded. For example, if A is a unit square then this happens when r = 1 2 2. In practice this is not a serious problem except possibly for very convoluted shapes of region A, since the precision of ˆK(r) also deteriorates with increasing r and the useful statistical information in ˆK(r) is confined to values of r which are small relative to the dimensions of A. Applications of ˆK(r) are described by many authors, including Cliff & Ord (1981), Ripley (1981), Diggle (1983), Upton & Fingleton (1985), Stoyan et al (1987). Motivated by recent applications in spatial epidemiology (e.g. Diggle & Chetwynd 1991), in which A is a geographical region with a complicated boundary, our objective here is to present an algorithm for computation of (1) when the region A is an arbitrary polygon. 3 Method The only non-routine step in the computation of (1) is the evaluation of the weights w ij. Explicit formulae are available for simple shapes of A such as rectangles or circles, e.g. Diggle (1983) p72. Our algorithm for a general m-sided polygon A proceeds as follows. 1. Find all the 2k 2m points of intersection of the circle in question with the boundary of A, by solving a quadratic equation for each boundary segment. Store two coincident points if the circle touches the boundary. If the circle passes through a vertex of the polygon, the code determines whether or not the polygon passes through the circle at this point by considering the direction of the two polygon segments at that vertex. 2. Order the 2k points in increasing angle around the circumference of the circle, from an arbitrary origin. Note that this partitions the circle into a sequence of arcs which alternate between being inside and outside the polygon. 3. Identify the largest arc and use a point-in-polygon test on the mid-point of this arc to establish whether that arc is inside or outside A. 2

4. Using the alternating property, sum the angles subtended by the k arcs which lie within A. Call this total angle θ. Then, w ij = θ/(2π). The use of the mid-point of the largest arc in step (3) is simply a convenient way to avoid problems of numerical instability. In step (4), the possibility of θ = 0 is precluded by a restriction on the range of r, as noted earlier. In order to handle multiple coincident points, we define w(x, 0) = 1 for all x. This is detected by the WEIGHT subroutine and a value of 1 is returned immediately without doing the full calculation. 4 Extensions Essentially the same calculations are involved in estimating the K-functions for a multivariate spatial point process, in which the points are of two or more qualitatively different types (Lotwick & Silverman 1982 ; Diggle 1983, chapter 7), or for a spatial-temporal process (Diggle, Chetwynd & Häggkvist, 1991). In its present form the routine will correctly handle concave and selfintersecting polygons. With a more comprehensive boundary data structure it can easily be extended to boundaries that are disjoint or regions A with holes. 5 Structure SUBROUTINE KHAT(X,Y,N,XV,YV,NV,NCELL,HCELL,HKHAT,IFAULT) Formal Parameters Input X Real*8 array(n) X-coordinates of points Y Real*8 array(n) Y-coordinates of points N Integer Number of points XV Real*8 array(nc) Ordered array of x-coordinates of vertices YV Real*8 array(nc) Ordered array of y-coordinates of vertices NV Integer Number of vertices defining the polygon NCELL Integer Number of tabulated values of Khat HCELL Real*8 Step size between successive r-values Output 3

HKHAT Real*8 array(ncell) Returned table of Khat values IFAULT Integer Error code The NV vertices define NV line segments forming the boundary of the polygon. The polygon is closed by a line segment from the NV th vertex to the first vertex. The values of the returned array HKHAT are such that HKHAT(J) = ˆK(J*HCELL) 6 Failure Indications The error code IFAULT returns 0 on successful completion. Non-zero values indicate an error, and the contents of HKHAT are undefined. IFAULT = 1 indicates that too many vertices were specified in the polygon data. Increase the parameter IBMAX and recompile. IFAULT = 2 indicates that a zero-length line segment was found in the polygon data. Remove one of the points defining this segment, and rerun with the new polygon data. IFAULT = 3 means that a point in the data was found to lie outside the polygon. Either remove this point from the dataset or enlarge the polygon to enclose it. IFAULT = 4 means that an odd number of polygon-circle intersections were found at some particular point and radius. This could only occur if there were a problem with the finite precision of the calculation, and we have never experienced it in practice. 7 Timings The most computationally intensive part of the routine is the calculation of the weight for a given pair of points. This is embedded inside two nested doloops, giving O(n 2 ) operations for n point events. The weight routine loops over the boundary polygon segments once, and for m boundary segments, the algorithm is therefore O(m). For further comparison, two other weightcalculation routines were coded, one to calculate the weight on a rectangular boundary by simple trigonometry, and a slightly more general version that was valid for any convex polygon. These routines were timed using uniform random point data on a square boundary. The ratios of the times for rectangular:convex:general algorithms were 1:1.8:2.6 4

8 Acknowledgements The authors would like to thank Ken McElvain for permission to use his point-in-polygon algorithm. 9 References Cliff A.D. and Ord J.K. (1981) Spatial Processes : Models and Applications. London: Pion Diggle P.J. (1983) Statistical Analysis of Spatial Point Patterns. London: Academic Press. Diggle P.J. and Chetwynd A.G. (1991) Second-order analysis of spatial clustering for inhomogeneous populations. Biometrics Diggle P.J., Chetwynd A.G. & Häggkvist R. (1991) Second order analysis of spatial-temporal point patterns. Bull. Int. Statist. Inst. Lotwick H.W. & Silverman B.W. (1982) Methods for analysing spatial processes of several types of points. J. R. Statist. Soc. B 44, 406-413 Ripley B.D. (1976) The second-order analysis of stationary point processes. J. Appl. Prob, 13, 255 266 Ripley B.D. (1977) Modelling spatial patterns (with discussion). J. R. Statist. Soc. B 39, 172 212 Ripley B.D. (1981) Spatial Statistics. New York: Wiley. Stoyan D., Kendall W.S., Mecke J. (1987) Stochastic Geometry and its Applications. Berlin: Akademie-Verlag. Upton G. and Fingleton B. (1985) Spatial Data Analysis by Example, Vol 1. Chichester: Wiley. 5