university college london modelling crime in mexico city using

52
U NIVERSITY C OLLEGE L ONDON D EPARTMENT OF S TATISTICAL S CIENCE M ODELLING C RIME IN M EXICO C ITY U SING S PATIAL S TATISTICS R AFAEL P RIETO C URIEL S EPTEMBER , 2014. S UPERVISOR DR .S IMON HARDEN

Upload: hoanghanh

Post on 14-Feb-2017

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: university college london modelling crime in mexico city using

UNIVERSITY COLLEGE LONDON

DEPARTMENT OF STATISTICAL SCIENCE

MODELLING CRIME IN MEXICO CITY

USING SPATIAL STATISTICS

RAFAEL PRIETO CURIEL

SEPTEMBER, 2014.

SUPERVISOR

DR. SIMON HARDEN

Page 2: university college london modelling crime in mexico city using

i

Page 3: university college london modelling crime in mexico city using

ii

Acknowledgements

To my mother and my brother,together the three musketeers.

To my grandmothers.

To my family.

To my friends.

To my teachers.

To Simon.

To Mexico’s Government and their support Via CONACYT.

To my father.

Page 4: university college london modelling crime in mexico city using

i

ABSTRACT

The objective of the present document is to detect if there are areas in Mexico City in whichcrime is clustered and have more crime than the rest of the city. If those areas exist, we wish toexplain why they are formed and for what reason do they occur in that particular place.

When modelling social events, like crime that is our task, an important attribute is the distanceto, for example, a public transportation station or the city centre. For that reason, to model crimefirst some covariates that are related to areas with an increased number of crimes are introduced,like Population Density or Social Deprivation. Then, using those variables a Linear Model isconstructed and then is analysed to see the goodness of fit of the model. For some reasons thatare explained in the document, the model is not very good and some variables are in some senseartificial, so a Spatial Model is then introduced and computed. A comparison between those twomodels is then exhibited and is proven that Spatial Statistics is a powerful tool that works easilywith some particular measurements like distance between objects. Thanks to Spatial Statistics weare able to introduce easily measurements in which there is a spatial structure that relates to theoriginal problem.

Also is briefly discussed the effect of the time in which the felonies are executed and theinteraction that it might have with the Spatial Model.

Then, a measurement for Police Action is introduced and then is used in a model that incorpo-rates Police action.

Finally, some conclusions are drawn from the models that were constructed and some importantfeatures about crime in Mexico City is then exhibited.

Page 5: university college london modelling crime in mexico city using

i

Modelling Crime in Mexico CityUsing Spatial Statistics

Rafael Prieto Curiel

Page 6: university college london modelling crime in mexico city using

Contents

1 Introduction 11.1 Mexico City . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1.1 Crime in Mexico City . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1.2 Reported crime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.1.3 Types of crime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.1.4 Biased Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.1.5 Place and time for the report . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2 Modelling Crime in Mexico City . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Spatial Patterns 42.1 Point process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.1.1 Tests for Complete Spatial Randomness . . . . . . . . . . . . . . . . . . . 52.1.2 Formal tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2 Inhomogeneous Poisson Process . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2.1 Estimators of inhomogeneous intensity . . . . . . . . . . . . . . . . . . . 72.2.2 Spatial Covariates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2.3 Smoothing variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2.4 Estimation of parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2.5 Edge Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2.6 Comparing models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.3 Goodness of fit of the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.4 Analysing a Point Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3 Crime spatial patterns 103.1 Random behaviour by type of crime . . . . . . . . . . . . . . . . . . . . . . . . . 103.2 Geographic Areas in Mexico City . . . . . . . . . . . . . . . . . . . . . . . . . . 123.3 Explanatory variables for crime patterns . . . . . . . . . . . . . . . . . . . . . . . 14

3.3.1 Population Density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.3.2 Central region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.3.3 Public Transportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.3.4 Social Deprivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.4 Linear Model for Crime Intensity . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.4.1 Model fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.4.2 Results from the linear model . . . . . . . . . . . . . . . . . . . . . . . . 173.4.3 Model adequacy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.5 Modelling Crime Intensity using Spatial Statistics . . . . . . . . . . . . . . . . . . 193.5.1 Reference Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.5.2 Defining spatial covariates . . . . . . . . . . . . . . . . . . . . . . . . . . 203.5.3 Spatial Relation between variables . . . . . . . . . . . . . . . . . . . . . . 213.5.4 Spatial Model for different types of crime . . . . . . . . . . . . . . . . . . 223.5.5 Model Adequacy and Analysis of residuals . . . . . . . . . . . . . . . . . 23

3.6 Traditional or Spatial methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4 Crime spatial and temporal patterns 254.1 Time measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

4.1.1 Time randomness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.2 Crime Intensity as a function of time . . . . . . . . . . . . . . . . . . . . . . . . . 27

i

Page 7: university college london modelling crime in mexico city using

CONTENTS ii

5 Police Strategy 285.1 Police Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5.1.1 Efficiency by Types of crime . . . . . . . . . . . . . . . . . . . . . . . . . 295.2 Spatial Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.2.1 Efficiency as explanatory variable . . . . . . . . . . . . . . . . . . . . . . 315.3 Measuring the strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

6 Conclusions 336.1 Security Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6.1.1 Distance to centre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.1.2 Distance to public transportation . . . . . . . . . . . . . . . . . . . . . . . 336.1.3 Contains a Public Transportation Station . . . . . . . . . . . . . . . . . . . 346.1.4 Social Deprivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346.1.5 Police Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346.1.6 Population Density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6.2 Areas to improve the models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356.2.1 Improving Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . 356.2.2 New Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356.2.3 Another Data Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

A Estimation of Parameters 37A.1 Estimation of parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

B Table of Results 38B.1 Distance parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Page 8: university college london modelling crime in mexico city using

Chapter 1Introduction

Crime is committed where three things meet at the same time: a potential victim or property tobe robbed, a criminal that wants to steal that property and an environment that allows that crimeto be executed. Those environmental attributes that can go from a dark alley, to a crowded streetor a business with less surveillance, tend to repeat periodically, so if today a crime occurred in aparticular place perhaps it is more likely that tomorrow another felony will be committed in thesame spot. The present study tries to determine the main urban factors that interact to make aparticular spot a place where crime is more intense.

Some of those factors that could help us explain why is there more crime in one area thanin another might be such as Population Density and Social Deprivation, which interact as socialexplanatory variables, but also some covariates like the distance to the nearest public transportationstation that help us estimate -or incorporate to the model- the amount of people that is in the streetsat a particular time of the day.

A third type of covariate that could help us explain the occurrence of crime in a region is theefforts that the city does to reduce crime, weather is by crime awareness, prevention programs,surveillance and security cameras or the presence of police officers that inhibit crimes. Howeverthese variables might be the result of an increased crime rate so they might not be a covariate thathelps us explain crime but perhaps is the result of that rate. Then that model could be used tomeasure the effect of the police strategy and then determine if there is a place that requires moresecurity resources.

The goal of this project is to understand the relation between crime spots and the covariatesmentioned to determine the effect that they have. Criminal reports from Mexico City were usedto develop a model that incorporates those factors in order to explain the effect that each of themhave in the occurrence of crime.

1.1 Mexico CityMexico City is the capital of Mexico and is one of the biggest metropolitan areas in the world. To-gether with its conurbation it has more than 20 million inhabitants. Due to information availabilitywe focus on the central region of Mexico City that has a population of 8.8 million inhabitants plusthe many million citizens that travel every day to that region to work or study.

1.1.1 Crime in Mexico CityCrimes are divided into two categories depending on the impact of the felony. High Impact Crimesmost likely occur in public spaces, most of the times the victim faces the criminal and the per-son that commits the crime exhibits a criminal behaviour that means that he knows he is doingsomething wrong and wants to hide it to the authorities. Examples of those crimes are burglarieson the streets, car thefts, shoplifting and shooting. On the other hand on a Low Impact Crime theperson doesn’t always exhibit a criminal behaviour and he or she doesn’t hide it from the authori-ties, some of them are committed inside private property and are the result of lack of conscious oropportunism. Some examples are drunk drivers, aggressions, falsification of documents or drivingaccidents. We will focus on high impact crimes that represent 34% of the crimes that are reportedin Mexico City.

1

Page 9: university college london modelling crime in mexico city using

CHAPTER 1. INTRODUCTION 2

1.1.2 Reported crimeIn Mexico City the victim of a crime, whether that crime was solved or not, might report it tothe authorities to have a formal complaint. Thanks to victimisation surveys we estimate that lessthan 10% of the victims report their crimes [from INEGI, 2012]. At the time when the victim isreporting a crime he or she is asked for basic information regarding that crime like the actual placewhere it happened, the time when it occurred and additional information, particularly useful to dosome investigation of that crime.

We know that the information available to analyse crime in Mexico City is biased towards thecrime that gets reported, that might contain some errors in its information and that represents lessthan 10% of the crime that is committed. However, this is the best possible source of information.There are two other sources of information:

• Compare results with another source of information from crimes like Emergency Calls.Those calls are made to a telephone number (066) and the victim reports a crime to theauthorities. However, this is also a biased source of information since not every person de-cides to call that number after suffering a crime so the sample would be biased to a certainpopulation with an increased civic culture.

• Validate results with victimisation survey. This survey is useful to estimate the amount ofcrime that is actually committed, but is not good to determine the place or the time of thecrimes.

We will be working only with reported crime through the entire document and the informationabout crime reports was available only for academic purposes and covered a period of one year ofreports.

1.1.3 Types of crimeIn Mexico City the High Impact Crime, which we will call simply crime, is divided in five bigcategories which are Robbery of a person, Car theft without violence (or simply Car theft), Cartheft with violence, Robbery of a business (or simply Shoplift) and others. Within the category’others’ we encounter shooting, homicide and sexual assaults and by its low frequency is hard totry to determine a pattern, so we will focus on the first four types of crime. Those four types areconsidered Property crimes since the criminal obtains a direct benefit after executing the felony.

The frequency in which those types of crimes are reported on a regular day in Mexico City is

Table 1.1: Reported Crime Distribution in Mexico CityCrime Daily Frequency % of the total

Robbery of a person 36.2 31%Car theft without violence 32.8 28%

Car theft with violence 14.5 12%Robbery of a business 11.8 10%

Others 20.7 18%Total 119.0

As we can see from 1.1 we will work with approximately 43,000 crimes that constitute thereported crimes in the city.

1.1.4 Biased InformationWe know that there we are handling only biased information through the police reports sinceonly a small percentage of crime gets reported. In addition is much more likely that a crime isreported when the amount of the property stolen is big [Website from ICESI, 2009] or when thereis insurance to claim. For that reason Car thefts get much more reported than Robbery of a person.

It is also possible that the amount stolen during a crime varies according to the region, soperhaps in a region with a higher social deprivation the property stolen is less valuable in whichcase the bias might vary by region.

Page 10: university college london modelling crime in mexico city using

CHAPTER 1. INTRODUCTION 3

1.1.5 Place and time for the reportMost of the times a crime has a particular place where it happened but that is not always the case.One example is a kidnap that might take place in a whole route. For that reason, the actual placewhere crime happened, in addition to possible errors committed by the person reporting the crimeand the person capturing the information, leads us to think that the variable might not be thatprecise.

A similar effect happens with the time of the crime since victims usually report their crimes inintervals of 15 minutes, so there are many crimes reported at 13:30 and at 13:45 but almost nonein the middle.

1.2 Modelling Crime in Mexico CityThe objective of the present research is to model and understand the effect that covariates have oncrime patterns, so firstly we dedicate the Second Chapter to formally define the framework whichwe will use, the type of information and the tests that we will perform in the rest of the document.

During the Third Chapter we first introduce the variable that we try to explain, then the covari-ates for the model and then we build first some linear model to explain the variable, which prove tohave some serious issues with its results. Some Spatial Models are then introduced and then checkfor their adequacy.

The following two chapters are intended to briefly discuss a very important aspect in crimeevents. First the time in which the felonies are executed is mentioned in Chapter 4 and then theimpact of Police Action is introduced in Chapter 5. These two topics are not treated with the samedepth and insight.

Finally in Chapter 6 the impact of the models and the covariates that are included and someconclusions are discussed.

Page 11: university college london modelling crime in mexico city using

Chapter 2Spatial Patterns

Through this chapter we will first define the concepts that we will use the rest of the document andthen define some properties and some statistics and tests that will help us analyse crime in a moremethodological way. This chapter is based on the work from [Diggle, 2014] and on the manualwritten by [Baddeley, 2010].

Most commonly we talk about a set of events that occurred in a particular place and we referto those events are referred to as Point Process. One simple example is the position of pigeons in apark at a particular time, where each pigeon may be represented by a point in the space. We thinkof a crime as one point in a map, where the position of that point represents the place where thefelony was committed.

A Region Process is determined by a bounded set, like parks in a city, or commercial areas ina particular neighbourhood, or more generally, a measurement of a particular variable of interestin a particular spot. One example is the amount of rainfall in one year at particular zone of therain-forest. The two type of process have a particular interest for us since we can think of crimesas a Point Process, in which each crime is represented by a spot in a map. To analyse those crimesin a spatial context we will be concerned with measurements and covariates in different regions,so we will combine both types of spatial process.

2.1 Point processWe refer to the space D which represents the plane in which we will focus and a set of objects orevents C contained in D with members ci, with i = 1, . . . ,n, where n is the number of points in thespace, and each object ci has coordinates (xi,yi). In our case, D is Mexico City and C is the crimereported, where the coordinates represent the actual place where the crime was committed. Bymaking an abuse of notation, ci might contain additional information, called marks like the type ofevent or the time that the event occurred.

The first basic idea with a point process is that in which points are distributed uniformly inD and follow the simplest possible pattern. We refer to this distribution as Complete SpatialRandomness or CSR and it follows that

• The number of points in A⊂D follows a Poisson distribution with mean λ |A|, where |A| isthe area of the region and λ is a measure of intensity, uniform in the plane. From this thedistribution on the number of points in A is

P [#(A) = n] =e−λ |A|(λ |A|)n

n!,

where #(A) means the number of events in the region A.

• Given that there are n points in the region A they are independent to each other and followan uniform distribution over A.

• For two disjoint sets A, B⊂D the random variables #(A) and #(B) are independent.

If the point process we study follows CSR then there is not much else to do but to estimate itsintensity and by that measure we are describing the pattern as good as we can.

Closely related to CSR we define an Homogeneous Poisson Process over a set D with intensityλ > 0 that has the following properties:

4

Page 12: university college london modelling crime in mexico city using

CHAPTER 2. SPATIAL PATTERNS 5

1. The number of events in any A⊂D is a Poisson random variable.

2. The expected number of events in A is λ |A|.

3. For two disjoint sets A and B, #(A) and #(B) are independent.

4. Given that there are n points in A, they follow CSR over A.

If in a region A⊂D we have n points then the log-likelihood function for λ is

l(λ ;n) =−λ |A|+n log(λ |A|)− log(n!),

from which deriving and setting equal to zero we get that

0 =−|A|+ n

λ̂.

Then the maximum likelihood estimator for λ is given by

λ̂ =n|A|

,

which is an unbiased estimator for the intensity.However most of the point processes are far away from CSR and its our interest to describe

the pattern as close and precise as possible. For that reason testing against CSR is one of the firststeps in spatial analysis since it tells us if there is an underlying pattern or if the distribution is justrandom.

2.1.1 Tests for Complete Spatial RandomnessThere are several ways to do a test that a certain point process follows CSR against an alternativehypothesis, in which the intensity is not uniform in D . The first uses the n(n−1) distances betweeneach pair of events and counts the number that are below a certain distance t, that means, we define

H(t) =1

n(n−1)#i6= j

(d(ci,c j)< t

),

where the function d(ci,c j) is the Euclidean distance between those two events and the function#i6= j (·) is just the number of distances taken over all i 6= j that satisfy a particular condition, in thiscase, being smaller than a distance t.

There are two main reasons why CSR hypothesis might fail: either points are clustered in whichcase many of the distances between points is considerably small, or points are too uniform and wecan see a regular pattern.

Obtaining the distribution for n points and their inter-distances in a particular region might bea difficult task, especially when the shape of A is not a basic figure like a square or a circle or whenn is big.

One informal test that could be used as a first step is to simulate n points on the region undera uniform distribution and then compare that distribution versus the actual data. In some cases itis also useful to simulate k times a uniform distribution and take the upper and lower limits andinterpret them as the extreme value that under CSR our data could achieve. That means, we wouldcompute the lower bound as

L(t) =1

n(n−1)min

k

{#i 6= j

(d(ck

i ,ckj)< t

)},

where cki and ck

j are both generic points obtained at the k-th simulation of the process, and similarlywe define upper bound as

U(t) =1

n(n−1)max

k

{#i6= j

(d(ck

i ,ckj)< t

)}.

When we simulate enough times then any deviation from the upper and lower limits could beinterpreted as a deviation from CSR and the envelope formed by [L(t),U(t)] is useful to identifythe reason why randomness would be rejected. If the observations lie above the envelope then is aclustered pattern whilst the observations below it means a pattern that is too uniform.

Page 13: university college london modelling crime in mexico city using

CHAPTER 2. SPATIAL PATTERNS 6

If we have simulated k > 2 times then at a fixed t0 the probability that a random distributionlies outside the limits given by [L(t0),U(t0)] is 1/k, so this could help us to get the power of thetest.

There are two potential disadvantages from this test, the first is that having to calculate thedistance between every pair of events can be time and memory consuming, particularly when thenumber of points is big. The second is that the test might not be so powerful to reject a clusteredpattern when the number of points is large. Hence, another criteria to reject CSR is based on theNearest Neighbour distance in which we can get a similar statistic based on the distance betweenone point and the closest to that one.

If we defineri = min

j 6=i

{d(ci,c j)

},

then ri is the distance from ci to its closest neighbour. Those distances, called the closest neighbourdistance help us compute the function

G(t) =1n

#i (ri < t) ,

and then we can proceed as before by simulating several times a uniform pattern distributedover the domain, and then computing the simulation envelope to determine if we are reject CSRfor that process.

2.1.2 Formal testsDISTANCE METHODS

Although the envelope obtained with the two distance methods mentioned above is a goodway to start and gives us a good idea of the process we can proceed to do a formal test with thefollowing function

M(t) =1k

[∑k

1n(n−1)

{#i 6= j

(d(ck

i ,ckj)< t

)}],

in the case we wish to use the distance between every pair of events and similarly for the caseof the nearest neighbour distance. That function M(t) is the mean obtained by the simulations,and we know that it will converge in probability to the actual distribution of that statistic. Then,thanks to the Central Limit Theorem, at a particular distance s the function M(s) will converge toa Normal Distribution in which the mean is the theoretical distribution, say M̄(s) and the standarddeviation is given by the simulations, say σs. Then, under the hypothesis that our data follows CSRit would just be an observation from that Normal Distribution.

Using the estimated parameters for that Normal Distribution, we can compute the probabil-ity that one observation is outside an interval, in which case we can reject the hypothesis if ourobservation is outside that interval.

For every possible value of s we have a different test, and it is even possible that for somevalues we reject CSR but for others we don’t. In order to get the most powerful test to reject weneed first to obtain a s?, which is given by

s?k = argsup∣∣∣∣M̄(s)−H(s)

σs

∣∣∣∣ ,which is the distance that maximises the difference between the theoretical distribution and our

observed data, divided by its standard deviation. We call this the distance to reject which is thedistance in which CSR is further from our observed data.

We then reject CSR if ∣∣∣∣∣M̄(s?k)−H(s?k)σs?k

∣∣∣∣∣> Φα/2,

where Phi is the cumulative Normal Distribution and α is the power of the test.GRID METHODS

Instead of the distance between events another option is based on the following idea. If giventhat the region A contains n points and we subdivide that region in k non-overlapping regions,then under CSR each region should contain approximately the same number of points, roughlyn/k if each region has the same area, or should have a proportion of its area if they have different

Page 14: university college london modelling crime in mexico city using

CHAPTER 2. SPATIAL PATTERNS 7

sizes. Here, as before, there could be two departures from CSR, with either a region that containstoo many points, that means a clustered pattern, and on the other hand, a distribution in whicheach cell contains approximately the same number is too uniform since we expect some naturalvariation. Usually although not necessarily we focus on a squared tessellation of A in which eachregion, usually known as quadrat, is a square with the same size.

A formal test using Quadrat Counts is based on a Pearson’s Chi-squared test. For that purposewe define qi to be the number of events in the quadrat i and q̄ the expected number of events perunit, and the difference between them as

X2 =m

∑i=1

(qi− q̄)2

q̄.

Our statistic X2 follows a χ2m−1 under the null hypothesis, where m is the number of different

areas in the test, so values of X2 that are too small or too large are reasons to reject CSR. Theproblem with this test is that it depends on the size of the quadrats that we used so the test mightfail to reject CSR if the size is not defined properly.

2.2 Inhomogeneous Poisson ProcessIf we reject the idea that the Point Process follows CSR the next big problem is to describe whichdistribution they actually follow. We only rejected the possibility that the distribution is uniform butthe alternative hypothesis was that it doesn’t follow that distribution. Then the second approach isto model an Inhomogeneous Poisson Process, in which the intensity λ is a function of the particularposition (x,y) ∈ A. In this case

P [#(A) = n] =e−λ ?|A|(λ ?|A|)n

n!,

whereλ? =

∫A

λ (x,y) dx dy.

The Inhomogeneous Poisson Process has the property that given that there are n events in theregion A then they follow a common distribution given by

f (x,y) =λ (x,y)

λ ?.

Then our interest is to describe as good as possible the function λ (x,y).

2.2.1 Estimators of inhomogeneous intensityOne way to obtain an estimate of the inhomogeneous function λ (x,y) is with a kernel smoothingfunction, like a Gaussian curve or a quadratic polynomial that penalises a point for being far awayfrom (x,y). Although we won’t estimate the intensity in this way we will use a kernel smoothingfunction for the residuals of our model in Chapter 3.

There is a parameter to be decided, which is the bandwidth of the kernel density estimation.That parameter might be chosen by an analytical methods, however, is in some ways arbitrary andsometimes up to the expert in the field.

However we will focus on a different approach which uses different covariates to determine itsrelationship with the intensity function.

2.2.2 Spatial CovariatesThanks to the function λ (x,y) we are allowing a different intensity in the space, that might be afunction of external factors from the Point Process.

One option is to let λ vary as a function of external covariates, in which case we assume that ifwe have a measure of a particular covariate in each spot given by g(x,y), then

λ (x,y) = f (g(x,y)) ,

for some function f . The factors that we can incorporate through the function g could be asdifferent as:

Page 15: university college london modelling crime in mexico city using

CHAPTER 2. SPATIAL PATTERNS 8

• A spatial function, that means having g(x,y) for each (x,y) ∈ D like a polynomial in termsof the position (x,y).

• A set Q in which case we could define the function gQ(x,y) = IQ(x,y) which takes the valueof one if the point is inside Q and zero everywhere else. This type of function might beuseful to test an hypothesis that inside that area Q there is a significantly different intensity.

• A Pixel Image which is a particular value of the function g inside each square of a tessellationof the domain. This type of function is the one which we will frequently use, and oneexample is the Population Density, and inside each pixel we have an estimate of the amountof people that live in that area.

In particular, when we work with a Pixel Image we are considering that the function g has aconstant value for the function inside each of the areas covered by a pixel, and is easy to manipulatesince it could be treated as a matrix, say U, in which the entry Ui, j represents the value of thefunction in the corresponding pixel with those coordinates.

By trying to explain intensity as a function of spatial covariates we are relating the originalPoint Process to a Region one.

2.2.3 Smoothing variablesOne of the hypothesis that we wish to test later on involves the value of a particular covariate butnot only in its position but in the surrounding area. For that reason we consider the value that afunction has on a pixel Ri, j and its smoothed version, given by S(R,τ)i, j. The way we define thesmoothed version is by

S(R,τ)i, j =1

1+4τ +4τ2

Ri, j + τ ∑k=i±1 or

l= j±1

Rk,l + τ2

∑k=i±1 and

l= j±1

Rk,l

,

and taking in account the particular corrections near the edges of the matrix.The way we define S(R,τ) depends on a smoothing parameter τ ∈ [0,1] and is such that

S(R,0) = R that means that there was no smoothing effect, and for τ > 0 in each pixel we aregetting a value that is penalising by τ the four adjacent pixels and by τ2 the four respective cor-ners. Thanks to this formula we can obtain a smoothed version of the pixel image Ri, j where thevalue in each pixel depends on the original value but also on the eight pixels that are adjacent to it.

We define Sk(R,τ) = S(Sk−1(R,τ),τ), so we can smooth a variable as many times as desired.In our context smoothing a variable help us to incorporate the proximity of two regions into themodel.

2.2.4 Estimation of parametersSince intensity cannot be negative, it is common to model the log-intensity of the process. We willassume in addition that we can write the log-intensity as a linear combination from m differentfunctions, in which case we assume that the intensity can be written as

λ (x,y) = exp

{β0 +

m

∑k=1

βkgk(x,y)

},

where each of the functions gk could be any of the three types defined previously and theβ1, . . . ,βm are coefficients.

Then it is our interest to estimate the parameters βi, for which is generally needed a nu-merical method. In our case all the models will be fitted through a Generalised Linear Modelthat uses Iteratively Weighted Least Squares. The models will be fitted through the software[R Core Team, 2013] using the package [Baddeley and Turner, 2005].

2.2.5 Edge EffectsOne important factor in spatial statistics are the edge effects. When we for example consider thenearest neighbour to one event that is close to the boundary of the region that is being consideredthen the distance might seem bigger than the rest of the points and that is mainly because some of

Page 16: university college london modelling crime in mexico city using

CHAPTER 2. SPATIAL PATTERNS 9

the potential neighbours are outside that region. Also for this reason the estimated intensity nearthe edges might seem smaller than it actually is.

There are ways to correct our measurements near the edge which are intended to correct thosepotential problems and in our context, we will focus on a region A that is fully contained in D andfor the computations near the borders, both the points in A and in its complement are considered.For example, to measure the nearest neighbour, we will focus on the points inside A, but thenearest neighbour could be outside A. This help us avoid those problems and thanks to that wedon’t underestimate the measurements near the edges.

2.2.6 Comparing modelsIf we wish to compare two different models that have different covariates included, the Akaikeinformation criterion can be computed. We prefer models with a smaller AIC since it is a measurethat penalises the number of variables included in the model.

2.3 Goodness of fit of the modelHaving estimated the intensity of the process in the case of an Homogeneous or an InhomogeneousPoisson Process we wish to understand if the fitted model is accurate. One of the main tools is todo a Quadrat test, which consists of dividing the area of the process, estimating the number ofevents that would have occurred in that area given that n events in the Point Process and computing

Ri =(qi− q̂i)

2

q̂i,

which is a measure of departure from the estimated number of observations in each quadrat.Then, we can compute

R =m

∑i=1

Ri,

which follows a χ2m−q with m− q degrees of freedom, where q is the number of parameters

estimated in the model. Then, we reject that we have a good fit from our model when R exceedsthe theoretical distribution. This test is similar to the one we used to reject CSR by quadrat countswhen we add each residual squared.

To assess the goodness of fit of a model is important to do an analysis of the Pearson residualsagainst variables included and not included in the model, as well as against (x,y) to determine ifthey follow a spatial pattern. This could indicate us that there is a lurking variable that perhaps wasnot taken in account when the model was constructed.

We can also analyse the smoothed residuals, which is a natural way of looking at the areas inwhich we are under or overestimating the intensity. For that purpose we compute the differencebetween a kernel estimate of the intensity and the model. Although it has the disadvantage ofhaving to define the bandwidth as a parameter, it allows a visualisation of the residuals of themodel.

2.4 Analysing a Point PatternHaving the tools at hand that we briefly mentioned above and having defined a region to do thestudy we can proceed to analyse any point pattern with the following steps:

1. TEST FOR CSR As a first step detect whether a Point Process is randomly distributed in thespace we analyse, in which case the best thing we can do is to estimate its intensity.

If we reject CSR detect the reason why, that could be done thanks to the simulation envelope.If we have a pattern that is clustered then it might be the case that there is a reason for thataggregated pattern and we wish to explain it with a set of covariates.

2. BUILD A MODEL WITH THE COVARIATES Incorporate the pixel images and spatial functionsto explain the intensity of the process.

3. CHECK THE MODEL ADEQUACY Analyse the smoothed residuals against (x,y) to detect ifthere is a region where the model fails.

Page 17: university college london modelling crime in mexico city using

Chapter 3Crime spatial patterns

In this section we will analyse crime reports from Mexico City and we will proceed with the threesteps mentioned at the end of the previous chapter:

1. Determine if crime occur in random places by doing a CSR test.

2. Model the intensity by some covariates that are reasonable.

3. Check the model adequacy.

In this chapter first we will try to fit a linear model for the reported crime and we will encounterserious disadvantages in that model, which motivates us to work with a spatial model.

3.1 Random behaviour by type of crimeWe know before doing a formal test that the types of crime which we analyse are naturally different.Although Robbery of a person could happen almost everywhere they mostly occur in streets. Cartheft happens both at streets and in car parks whilst shoplifting might only occur in commercialareas so by nature is bounded to a particular place.

Since each crime has its own special features we expect a different behaviour from each ofthem. We can see that comparing the nearest neighbour distance within each type of crime gives thefollowing result after simulating 99 times a Spatial Random distribution (so under the hypothesisof CSR we have 100 observations) in the space we are considering. To avoid any issues with theedge we focus on a particular squared area that measures 14.8 kilometres in each side, is fullycontained in the area covered by Mexico City and is approximately the biggest possible windowwith that property and it contains most of the public transportation stations, the city centre andmany of the high density zones in the city. This region will be fully discussed later and will oftenbe used in the rest of the document.

Figure 3.1: Test for CSR using distances between events

10

Page 18: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 11

We can see in figure 3.1 for each of the four types of crime a different envelope given by theshaded area and the actual observation that lies outside the envelope given by the red line. Althoughin the four cases we are testing in the same area the only difference between them is the amountof points included, which is why the envelope obtained in the Robbery of a person case is muchthinner than the other cases since the intensity is much bigger. In addition we can see that Robberyof a person and Robbery of a business have a pattern that is more clustered whilst Car theft has apattern that is more uniform and hence closer to the envelope.

Thanks to this simulation we can get a formal test to reject CSR that is based on the distancemethod mentioned on Chapter 2.

Table 3.1: Test against CSRDistance to

Crime reject p-valueRobbery of a person 36m < 0.01

Car theft 42m < 0.01Violent Car theft 71m < 0.01

Robbery of a business 29m < 0.01

As we can from table 3.1 each crime has a different value in which the test is more powerful,but in the four cases we have very strong evidence to reject CSR.

So we reject that any of the four types of crimes happens in a random place. Having rejectedthat crimes occur in random places is an important step, but is really not that powerful. By a simplescan of a crime map we could convince ourselves that they are concentrated in particular placesand that there are areas with almost no crime. Now we wish to understand the relation betweencrime and other variables.

Figure 3.2: Crime map from a central area in Mexico City

Rejecting that crime occurs in random places is done easily by simply looking at the criminalmap, like figure 3.2. Crimes, particularly Robbery of a person, is clustered in some areas.

Page 19: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 12

3.2 Geographic Areas in Mexico CityAlthough having uniform regions to do the measurements is desirable since interpretation is morestraightforward, sometimes the geography of a city allows a partition that is more natural in termsof the social and economic entities.

Mexico City is divided in 2,432 different regions called Geographic Areas and although theyare really different in size and shape within each area there is some uniformity in terms of mea-surements and social context (figure 3.3).

Within each area we have data available from the 2010 Census like population, average age,economical activities or unemployment [Website from INEGI, 2010]. Although the data is from2010 and our crime data from a different period time, that is the most precise information availableand any other is just projections and guesses.

Figure 3.3: Geographic Areas in Mexico City

All crime is assigned to one and only one of the geographic areas, so for each one we estimatethe Crime Intensity measured as the number of crimes per unit area in each region and that measureis comparable within regions (figure 3.4).

We will use Crime Intensity for the different types of crime, measured in the same way.

Page 20: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 13

Figure 3.4: Crime Intensity per Geographic Areas in Mexico City

There are many areas in which crime intensity is zero or close to zero, whilst the area with thehighest intensity has just above 500 crimes per squared kilometre (see figure 3.5). This particularobservation is a market that is one of the biggest in the city.

Figure 3.5: Histogram for Crime Intensity in Mexico City

Page 21: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 14

Not all of the 2,432 areas are inhabited. For example one of them is the city airport (the bigarea in the East part of the city), another is a forest (Chapultepec, divided in 5 areas located in theWest part) and another is the biggest University in Latin America (Ciudad Universitaria, in theSouth). For this reason some observations might have a very specific behaviour.

We will try to explain Crime Intensity but first we define the covariates that we will incorporateto our model.

3.3 Explanatory variables for crime patternsFirst we will define each of the variables that we will incorporate to the model and the advantagesand disadvantages that those variable have.

3.3.1 Population DensityIs natural to think that when there is more people there is more crime in that area and for thatreason the first variable is Population Density measured as the number of people that live per eachunit of area [Website from INEGI, 2010].

3.3.2 Central regionThe effect of being in the central area of the city is important since in the central region there isa bigger amount of people that might not live or work there but that have to go across that regionon their daily commute. As we get closer to the city centre we expect to see more economicalactivity and more people and for that reason the variable Distance to City Centre was introducedto the model, which was measured for each tile from its respective centroid to the central square inMexico City.

To provide statistical strength to the variable the greatest value of that measure is trimmed downto a maximum possible value, which is simply interpreted as being far from the city centre. Thenthe variable is defined for a fixed point C0 as

dCi = min{d(C0,Ci),M}where by C0 we mean the city centre and M a value that gives the variable a maximum value. Thevalue of M was estimated (see the Appendix for the procedure) to make the model as powerfulas possible. To every point that lies outside a region of M kilometres within the city centre thevariable uses the same value and can be interpreted simply as the point being far from the centre.

3.3.3 Public TransportationIn Mexico City there are five types of public transportation, the first and biggest being the under-ground system known as Metro with 195 stations and more that 7 million passengers every day. Thesecond system is known as MetroBus, with defined routes similar to the bus system from Londonthat transports less than 1 million passengers every day. The third one is the Tram, which is similarto the underground station on a smaller scale that only operates in a particular region of the city.The fourth type is the electric train known as Trolebus, that has eight different lines but they lackof a proper station. Finally a much less structured system consisting of buses and taxis move thecitizens from Mexico City. Based on the importance and the structure of the system and stations wewill focus on the first three types of public transportation to explain crime events, with informationavailable from [Website Open Data Mexico City, 2014], [Website Metro Mexico City, 2014] and[Website MetroBus Mexico City, 2014]. In the central area of the city there is a station relativelyclose to every corner, as we can see in figure 3.6.

Just like we did with the distance to centre, we will measure the distance to the closest stationand trim that variable to an upper bound (see Appendix). The distance parameters used for publictransportation and city centre where estimated by each type of crime, since they will naturallyaffect in a different way if criminals depend on public transportation after committing the crime,in the case of Robbery of a person and shoplifting, but they have a way to leave the crime scenewhen they steal a car.

Page 22: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 15

Figure 3.6: Public Transportation in Mexico City

3.3.4 Social DeprivationOne of the common explanations for criminal activities is the one that relates crime to socialdeprivation. There are three possible explanations that relate crime to income. The first is that aperson decides to become a criminal based on economic needs and for that reason areas with lessdevelopment are more likely to have criminals living there and therefore expect more crime. Thesecond is that in more developed areas there is more investment in private security and even publicsecurity making crime less frequent. Finally a third explanation is that in areas where there is morewealth the criminal expects more income from committing a crime and therefore we would expectmore crime where there is a higher income. Assuming any of those three theories there should bea strong impact from a variable that represents economical welfare. We will use for that instancea variable that divides the geographic areas in 5 different categories based on their income andsome other characteristics that represent wealth. We will refer to this as Social Deprivation. Thisvariable is ordinal and is regularly interpreted as

1 Highest social deprivation

2 High deprivation

3 Regular income and welfare

4 High income and access to public services

5 Highest income

Page 23: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 16

Figure 3.7: Social Deprivation in Mexico City

It is maybe natural that areas with an increased social segregation are clustered together justas areas with less social segregation, as we can see in figure 3.7. We can also see that the mostdeprived areas in the city are commonly in the most distant regions from the centre.

3.4 Linear Model for Crime IntensityIn order to explain the Crime Intensity, the effect of different covariates was incorporated in aregular linear model, that means that even when we estimated some variables as a distance, thereis no spatial structure in this type of model, given by:

CIp = I0

(Density effect) + α1D + α2D2

(Distance to Public Transportation) + β1dGS + β2dM + β3dMB + β4dT(Public transportation indicators) + γ1IGS + γ2IM + γ3IMB + γ4IT

(Distance to center) + δdC(Social Deprivation) + ηSD

(Error term) + ε

where the variables are

Page 24: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 17

Table 3.2: Variables in the Linear ModelCI Crime Intensity in each region, crimes / areaI0 An intercept for the modelD Population Density in each region, people / area

dGS Trimmed distance to public transportation (any)dM Trimmed distance to a Metro Station

dMB Trimmed distance to a MetroBus StationdT Trimmed distance to a Tram StationIGS Indicator if the area contains a Station (any)IM Indicator if the area contains a Metro Station

IMB Indicator if the area contains a MetroBus StationIT Indicator if the area contains a Tram StationdC Trimmed distance to City CentreSD Social Deprivation

Finally p is a parameter to transform the Crime Intensity in order to smooth the variable sincewe have some extreme values, with p ∈ (0,1). We could have used another transformation butCrime Intensity has many observations close to zero, so a transformation like the square root,which is contained in ours when p = 1/2 seems more reasonable. The transformation was alsotreated as a parameter and optimised (see Appendix).

3.4.1 Model fittingTo estimate the parameters of the linear model, three considerations were made:

1. Although Crime Intensity is comparable between different areas, they are not equally im-portant to the model, (like the airport or a park), which is why to estimate the parametersWeighted Least Squares was used with the population in each area as the weights.

2. Some interactions were introduced to the linear model to take in account the effect of astation on an area with high population density or the effect of social deprivation consideringthe amount of people in that situation.

3. The model has too many variables that could be correlated, so a variable selection procedurewas executed including all the variables and then dropping some of them to minimise theAIC.

3.4.2 Results from the linear modelWe obtain the following results, that were computed using [R Core Team, 2013], where we use thefollowing notation:

+ if the covariate increases we expect more crime,− the covariate reduces the expected crime, and· means that the variable was dropped.

For the values of each parameter estimate see the Appendix B.As we can see from the table 3.3 the explanatory variables are different for each type of crime

and the effect that they have is also different. In some cases a variable increases the intensity of atype of crime but decreases the intensity of another type.

In general although is not always the case, as we get closer to a station for public transportationwe expect a higher crime intensity and similarly with distance to city centre. A deeper analysis ofthe results obtained will be presented in Chapter 6.

Also is important to be aware that for the general crimes and for Robbery of a person the modelhas an R2 much bigger than the other three cases, particularly the case of violent car theft in whichthe model only has a 22% of correlation between the adjusted intensity and the observed one.

Page 25: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 18

Table 3.3: Variables in the Linear ModelGeneral Robbery Violent ViolentCrimes of a person Car Theft Car Theft Shoplift

Intercept + + + + +p 1/2 1/2 3/4 3/4 1/2

Density + + + + –Density2 – – – + –

Distance to Centre – – · + –Distance to Centre2 · + · – +

Distance to Metro St – – – – –Distance to MetroBus St – – – – –

Distance to Tram St · + · – –Distance to Station – – – + +

Contains Metro Station · + · · ·Contains MetroBus Station – · – – ·

Contains Tram Station · · · · ·Contains General Station + – + + +

Deprivation · – + – –Density : Distance St + + + + +Density2: Distance St + – + + +

Density : Distance Centre – · – – ·Density2: Distance Centre – · – – ·

Density : Deprivation · · + – –Density2: Deprivation · · – – –

Adjusted R2 58.7% 48.5% 38.3% 22.1% 22.5%

3.4.3 Model adequacyWith only a small quantity of variables we could explain roughly 59% of the crime intensity ineach area, or less if we open the information by type of crime. Before proceeding to check themodel adequacy it is important to understand the variable that we are explaining. Crime Intensityor the other intensities are strictly positive and zero in some regions.

We cannot assume that the observations are independent since it is possible that observationsthat are close have some impact on each other. Since the observations might be correlated thenthe estimated variance of the parameters might be bigger than we estimated and our model isbasically useful to understand the correlation between the variables taking in account the rest ofthe covariates.

When we look at a map of the residuals of the four models (figure 3.8), we can see that a regionwhere the model overestimates the crime intensity is usually surrounded by areas with similarresiduals. We then reject the idea that residuals are randomly distributed which perhaps indicatesthat there is still a geographic variable that we are not taking in account or that a linear modelwithout spatial features is not adequate, which is why a spatial model is then considered.

An interesting remark in that same figure is that in the model for Robbery of a person, thereare some areas in the central region with a much bigger residual that correspond to the market thatwas mentioned previously. That area is considered one of the most dangerous places in the cityand perhaps it makes sense to consider it as an outlier.

There are many theories on crime and some of them are tested in the previous model, forexample, the fact that an area that is closer to a Metro or MetroBus station has more expectedcrime than if it was far away. However there are many other theories that are hard to test withthe previous model. One of them is that areas that have small social deprivation but are close to aregion with high deprivation expect more crime. This hypothesis would be hard to test since wedon’t have a natural way of incorporating information from close areas using a linear model.

Page 26: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 19

Figure 3.8: Residuals from the four models

3.5 Modelling Crime Intensity using Spatial StatisticsUp to now we have used a linear model in which each area is treated independently from the othersand there is no spatial relation but basic distance measures and counts. A second option is to modelthe process as an Inhomogeneous Poisson Process, in which the intensity (which we assume to benon-uniform) is a function of particular covariate(s). In this case we use a glm model with a loglink, that is, we assume that the intensity can be written as

λ (x,y) = exp{ f (x,y)} ,

as mentioned in the previous chapter. In our case we will fit a model where f is a linearcombination of the covariates introduced previously. To fit the model [Baddeley and Turner, 2005]was used.

3.5.1 Reference WindowWe use each variable in a squared grid with 50× 50 squares, with each square with 296 metersin each side, which gives us a Reference Window of 14.8 kilometres in each side (see figure 3.9).The area analysed is just above 219 square kilometres, that is 2.5 times the size of Manhattan.That Window is fully contained in the area covered by Mexico City and was used previously to

Page 27: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 20

test against CSR. Within the window of analysis a 48% of the crimes are contained and 28% of thespace covered by the geographic areas.

Figure 3.9: Reference Window for Spatial analysis

3.5.2 Defining spatial covariatesWe try to use the same set of covariates now in a spatial model, so for each variable we definea pixel image which is the value of the variable in each square. For its calculation the followingprocedure was executed:

1. For each pixel estimate the surface in the intersection with each of the geographic areas.

2. Use the area of the intersection to estimate a weight that the area has in that pixel.

3. Estimate a weighted average of the covariate in each pixel using the weights defined previ-ously.

That procedure requires computing the surface covered in the intersection between the 2,432areas with 2,500 pixels and required several hours of processing, but thanks to that we have a wayof defining the covariates as a pixel image.

As an example of the covariates used in the spatial model see figure 3.10 that has the trimmeddistance do the city centre and the trimmed distance to a public transportation station.

When we fit a model using Spatial Statistics and these covariates, the results obtained should besimilar to the ones we estimated in the linear model mainly because the variable we try to explainand the covariates are the same so we are not introducing much new information or modellingtechnique. The main difference should only come from the fact that we are trimming down theexternal part of the city, but results should be extremely similar, if we obtained a different resultthen it would be inconsistent with our previous model.

Page 28: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 21

Figure 3.10: Variables in the model

3.5.3 Spatial Relation between variablesIt has been widely discussed that criminals tend to commit a crime in a region that is not preciselythe same area where they inhabit and for that reason the effect of some of the variables shouldbe not only on a particular area but in a whole radius. Thus an area with a high density mighthave a strong impact not only on that area but in a whole surrounding region. For that reasonwe would like to incorporate the effect that a particular measure has not only on a region butin its closest neighbours. Those effects would be difficult to compute, hard to manage and evencomplicated to interpret using traditional statistics, since we would need to measure the distancebetween different regions. Since the Geographic Areas we used in the traditional models varytoo much in size and shape it might be the case that two regions are close to each other but theircentroids are considerably far away from each other.

Using techniques for spatial statistics help us to incorporate the effect of a variable by smooth-ing its measurements (as mentioned in Chapter 2). We are capable of computing easily a smoothversion of our variables which will be included in the model. For that reason we smooth somevariables like Population Density (see figure 3.11) or Social Deprivation (see figure 3.12), takingin account that is an ordinal variable and treating it as a numerical variable.

Figure 3.11: Population Density and its smoothed version

Both of these variables seem to have a more reasonable effect when we consider their smoothversion since it doesn’t make much sense to think of a pixel with low density surrounded by highdensity areas and think that it will have only low density impact. To avoid choosing arbitrarily oneof those variables we will compare the models AIC with and without both covariates.

Page 29: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 22

Figure 3.12: Social Deprivation and its smoothed version

The variables were smoothed twice with a parameter τ that was chosen to maximise the coef-ficient associated to that variable to make it more powerful, and again it was done following theprocedure mention in the Appenndix.

3.5.4 Spatial Model for different types of crimeApplying the model for the different types of crime we get different results in each of the types,starting by the variables that have an impact on the model and again, we incorporate interactionsbetween variables and then execute a model selection procedure to minimise the AIC of the model.

As a result from the models we have the following, which also only includes the sign of thecoefficient, being + if the variable increases the expected crime intensity, − if it decreases and ·when the variable is dropped.

Table 3.4: Variables in the Spatial ModelGeneral Robbery Violent Violentcrimes of a person Car Theft Car Theft Shoplift

Intercept – – – – –Density · – + · ·

Smooth Density – – – + –Distance To Centre – – – + –

Distance to Metro Station · · + – –Distance to MetroBus Station · · · – –

Distance to Tram Station · – + – –Distance to General Station – – – – ·

Contains Metro Station – + – – –Contains MetroBus Station · · · · ·

Contains Tram Station · · · · ·Contains General Station · · · · ·

Social Deprivation · · + · –Smooth Social Deprivation + – + + +

Sm Density : Sm Deprivation · · + · –Sm Density : Dist Centre + + + · +Sm Density : Dist Station + + · + ·

We see in table 3.4 that the covariates Smooth Density and Smooth Social Deprivation enteredthe five models whilst the pure variables Density and Social Deprivation were dropped in four ofthe five models. The fact that we can take in account measurements that are close to one area isone of the biggest strengths we obtain by using spatial statistics in our models. In addition, thanksto the spatial model, we managed to incorporate the smoothed version of Social Deprivation to themodel for general crimes, which was dropped in the linear model.

Before assuming that one variable is more important than others we need to consider the mag-nitude that the coefficient and the variable have to understand the effect. In addition we see that

Page 30: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 23

none of the variables have a steady effect over the five models, so for example, while Robbery of aperson is expected to increase near the city centre, it has the opposite effect in Violent Car Theft.The coefficients for both models for each type of crime are included in the Appendix.

3.5.5 Model Adequacy and Analysis of residualsWe can see in figure 3.13 the effect of our variables in the model fitted for Robbery of a person withthe smoothed residuals as we go from the basic model in which we assume a Uniform distribution,then we incorporate the variable Distance to Centre, then the variables associated with Publictransportation and Social Deprivation and finally the effect of the smoothed covariates.

Figure 3.13: Incorporation of variables

As we can see in figure 3.13 the final model is a much better fit than the previous one, however,there are still some patterns that show that the model is far from being a perfect fit.

Page 31: university college london modelling crime in mexico city using

CHAPTER 3. CRIME SPATIAL PATTERNS 24

3.6 Traditional or Spatial methodsAs we can see from the results from this chapter, the traditional methods have some advantagesthat go from their easy computation that translate into fast methods of variable selection and modelcomparison. They also have the ability to incorporate observations that are far away from the studyregion. We could have considered, for example, information from another urban area and compareresults, which wouldn’t be easy to do with spatial methods. With traditional models is easy toweight observations based on their population so adding nonsense observations like the airport orthe forest do nothing to the model.

The downside from traditional methods is that our observations are not independent and thereis no natural way of considering spatial component in the model that can be spotted in the mapof residuals from the model, which shows similar colours in close areas, so our estimates for thevariance of the coefficients might be bigger.

On the other side, the spatial model allowed a natural way of incorporating spatial variablesand considering distance between our observations. Is much more consistent since don’t worrymuch about observations being big or small since we use same size pixels. In addition we are ableto refine the information provided as much as needed which with the traditional method is hard toachieve.

Thanks to spatial models we are able to consider the effect of a particular covariate not only inone area but also in its surroundings, so by smoothing our variables we were able to understand theeffect that an area with high density has on its proximity, for example.

There is a price to pay that can be considered really high. First is that the computation is not sosimple because it is executed through a glm that has no analytical solution, so the algorithms takemuch longer to execute.

Another huge issue with spatial statistics is defining the area of analysis. In our case it was se-lected to avoid the airport which would have made some inconsistent observations especially withthe smoothed variables. If the airport would was in a different location we could have incorporateda much bigger proportion of the urban space. By taking in account the central area of the citywe are considering 48% of the crime in only 28% of the area, which clearly indicates us that wechoose the most criminal area of the city. In the rest of the city, although variables might not beso powerful since there is not much crime to explain, is also important. In this model the variableshave an increased power than they actually have in the whole Mexico City.

When observations were geographic areas it was easy to dismiss irrelevant areas by their pop-ulation but with spatial statistics our solution was to trim down the city to areas without thoseissues.

Finally since what we estimate using spatial models is the log-intensity of crimes, it is impos-sible to incorporate a squared effect of variables, as we did with the traditional methods so is notpossible to add those variables to our model.

In conclusion both modelling techniques have advantages and disadvantages so for similarstudies it would be important to try them both and to compare results. However, the spatial modelprovided us a powerful way of modelling the spatial distribution of crime in Mexico City.

Page 32: university college london modelling crime in mexico city using

Chapter 4Crime spatial and temporal patterns

A very important thing to consider is not only the place but also the time when crimes occur.It might be the case that crimes happen randomly in different hours of the day and days of theweek, or more reasonably, that they also follow a particular pattern on the time in which they arecommitted. It might even be the case that if a felony happens in a particular place then, due topolice action and victim awareness, there is no crime occurring in that same place for a certainperiod of time.

Figure 4.1: Crime density by time of the day

The type of crime is also very important to the time variable as we can see in figure 4.1. Mostof the Shoplifting, since it depends on the store being open, has a fairly limited schedule in whichit might occur. On the other hand, Car theft, since it happens when the victim is not around thevehicle, then most of the times happens when the victim is either asleep or at work. Finally, sinceRobbery of a person depends on people being on the streets it is a crime that is far more commonto occur during daytime.

25

Page 33: university college london modelling crime in mexico city using

CHAPTER 4. CRIME SPATIAL AND TEMPORAL PATTERNS 26

4.1 Time measurementsAn important consideration with the time of the events is that the variable might be treated indifferent ways depending on the type of pattern is being analysed. For example, we can focuson the time of the day, in which case we get a cyclic behaviour of the variable. Similarly weconsider the time of the week in which the crime was committed. In those two ways the timebetween two events is bounded by 12 and 84 hours respectively (half a day and half a week), butwe could also consider the variable without any treatment in which case the time between twoevents is unbounded. Although there are other ways to treat the time variable, like a yearly pattern(although we would need more than one year in observations to be able to analyse it), we will focuson those three, and we consider one unit of the variable as one day.

Formally we define the time between two events Ci and C j as

dR(Ci,C j) = |Ti−Tj|,dD(Ci,C j) = min

k∈Z

{|Ti−Tj + k|

}, and

dW (Ci,C j) = mink∈Z

{|Ti−Tj +7k|

},

where Ti and Tj is the time for events i and j and dR, dD and dW are the regular time, daily andweekly time variables.

4.1.1 Time randomnessFocusing only on regions with high crime intensity we can test three different hypothesis that willhelp us understand the effect of time in crime patterns. These hypotheses are that crime happensuniformly along time when it is measured in the different ways we established previously against analternative one, in which crime occurs with a distinct pattern, for example, it tends to be committedat particular times of the day or specific day of the week.

Figure 4.2: Comparison of time measurements in two different regions

Page 34: university college london modelling crime in mexico city using

CHAPTER 4. CRIME SPATIAL AND TEMPORAL PATTERNS 27

In figure 4.2 we compare the test for CSR that was executed in two different geographic areasusing the three different time measures. The first one, Region 1 is one of the 8 areas with the highestnumber of crimes, that is close to the city centre and to a Metro Station, Region 2 corresponds tothe market mentioned previously, that is closed during the nights and has almost no activity duringweekends. We can see that when measuring time between events in the regular way we wouldn’treject the hypothesis that crime occurs uniformly along the year which we are analysing. Howeverwhen we use the daily distance the hypothesis that crime happens uniformly along a day is easilyrejected in the market area whilst it cannot be rejected in the first one. The figure clearly showsthat in the second region crime is committed in a particular range of hours.

Two important conclusions can be drawn from this idea. The first is that the way we measurethe time between events is crucial to understand the pattern they follow and it might be the casethat crime tends to occur at a particular time of the day, like the time when people are commutingto their jobs or back home, but crime might look uniform and without a definite pattern whenmeasured in regular ways.

The second idea is that clearly the time between events is considerably different between thetwo regions which we are comparing. That means that there is interaction between the area whichwe analyse and the time pattern for the crime.

4.2 Crime Intensity as a function of timeWe have established in the previous chapters that we could get an estimate of the crime intensityexplained by different covariates and that we could then interpret the effect that they have on theexpected crime.

Combining spatial modelling and the time information we could then have an estimation ofcrime intensity as a function of both space and time. With a kernel smoothing process we couldestimate the effect that a crime has in the surrounding area and the surrounding time, then we couldestimate the spatial model that we introduced in Chapter 3 in different moments of the day. In thatcase we could, for example, get a model in which population density is a dominant variable for themodel during mornings and evenings, which is when people is commuting from home to work andvice versa, but distance to city centre is a more important covariate during the rest of the day.

Page 35: university college london modelling crime in mexico city using

Chapter 5Police Strategy

Police strategy changes constantly based on the crime pattern that analysts and crime specialistsare able to detect. They try to predict and prevent crime occurring in a particular spot, they doforensic investigation to arrest the responsible of committing a crime and they allocate securityresources like cameras or police officers to intercept criminal while executing their felony.

The strategy implemented is not static and obeys many factors like crime reports, emergencycalls and social events and is constantly redesigned to improve results. Criminals have a strategyto avoid being captured and they decide the place and time to execute their crime. However thereare different types of criminals. On the one hand a crime like Robbery of a person or Shopliftingis considered to be opportunist and without much planning or strategy involved whilst on the otherhand a crime like Car theft, particularly when committed with violence, involves targeting, carefulplanning by the criminals which usually act in gangs.

5.1 Police EfficiencyThere are four ways in which crime is considered to be solved, or controlled, which are

• Prevention Involves working with vulnerable population and potential criminals to persuadethem from having criminal behaviour, and working with potential victims to make themaware of the risk they have. Its effect is measured on an estimate of the number of crimesthat would have occurred without that program, and usually requires a long period of time tomeasure its effectiveness.

• Prediction In this particular case involves police and other security resources allocation inorder to detect criminals while committing a crime or planning it or running away from thecrime scene.

• Reaction Thanks to victims or witness of a crime that call an emergency number, or by othermeans, a police officer is able to arrest the person that just committed a felony.

• Investigation By forensic means, like finger prints, DNA tests and other resources, detec-tives are sometimes able to solve a crime in terms that they know who the criminal was, theyknow their motives to do the crime and they manage to arrest her or him if the criminal isstill on the streets. Usually when a crime is solved in that sense many other crimes were alsosolved, and its effectiveness is measured in a long time period.

In all cases the crime considered to be solved is also a reported crime, so is a particular subsetof those crimes that we studied before. In the case of Prediction and Reaction it involves directlythe police strategy allocation and the amount of resources applied to each region so we will focuson this particular feature to measure Police Strategy, and based on that we define the followingmeasure:

Efficiency =Number of crimes solved

Total crimes,

and we can measure Efficiency in a particular subset by considering only those crimes.

28

Page 36: university college london modelling crime in mexico city using

CHAPTER 5. POLICE STRATEGY 29

5.1.1 Efficiency by Types of crimeSince crimes are different one from the other we have the following Efficiency in each type foreach of the types of crimes:

Table 5.1: Police Efficiency by type of crimeCrime Efficiency % of the arrests

Robbery of a person 20.2% 68.9%Car theft 1.7% 5.5%

Car theft with violence 3.3% 4.6%Shoplifting 10.0% 11.3%

Others 5.3% 9.7%General crimes 9.1% 100%

There is a strong difference between Robbery of a person and the other types of crime, as wecan see in table 5.1, particularly those involving car thefts. This might be due to two importantfactors. First is that victims of a crime are more willing to report their crime if an arrest has beenachieved by the authorities, however this effect is not present in car thefts since we know that mostof the cars that are robbed are reported for insurance claims. Second is that particularly for cartheft, since it is committed with the absence of the victim, is sometimes hard to identify that thecar is being stolen so even if a police officer is meters away is not clear that by police allocation,that is Prediction and Reaction, this crime could be solved. Additionally when criminals steal a carthey have a fast way to run away from the crime scene so even when a victim is involved not muchcrimes are solved.

5.2 Spatial EfficiencyWe know now that 9.1% of the high impact crimes are solved by either Prevention or Reactionand now we will see if that percentage is fairly uniform across Mexico City or if we can find aparticular area in which the police department reacts better or has a more successful strategy.

Figure 5.1: Police Efficiency in Mexico City

Page 37: university college london modelling crime in mexico city using

CHAPTER 5. POLICE STRATEGY 30

As we can see in figure 5.1 that is a smoothed version of Police Efficiency inside the ReferenceWindow that was used previously, there is a strong pattern and there is an increased Efficiency inthe central region of the city.

Given the fact that there are areas with an increased rate of crime we don’t expect the samenumber of arrests in different regions. Rather, we consider the number of crimes that were reportedin each quadrat and we focus on those that ended up successfully. We consider a Quadrat Efficiencywhich is calculated as the efficiency within each square. This measure of Efficiency is what we tryto see if it is uniform in Mexico City, since it stands for the probability that if a crime is committedin a particular quadrat then an arrest solves the crime and likely the stolen property returns to thevictim. This measure is only defined in regions that have more than one crime, so the quadratswith no crime were excluded from this test.

We would like to test the null hypothesis that Efficiency is Uniform in the plane, with θ0 theefficiency against an alternative one, in which Efficiency varies in every region.

Assuming the null hypothesis is true then conditional on the number of crimes in each quadrat,the number of arrests should follow a Binomial distribution, ie

Ai|Ci ∼ Bin(Ci,θ0)

where Ai is the number of arrests in the quadrat i and Ci is the number of crimes. Then we cansimulate the efficiency under the null hypothesis given the number of crimes in each region andcompare the simulated conditional Efficiency against the true one and look for departures from thatdistribution.

Figure 5.2: Quadrat Efficiency in Mexico City against a conditional simulated one

There are many quadrats in which we would expect zero arrests given by the fact that theyhave a very small number of crimes, and hence, the expected number of arrests is close to zero inthat region. However we see from the envelope in figure 5.2 that the actual number of quadratswith zero arrests is larger than we would expect, which indicates us a strong departure from theassumption that Efficiency is uniform in that area.

Having rejected the hypothesis that Efficiency is uniform in different areas of the city we wishto explain what affects it. If for example Efficiency increases with population density then wecould interpret it as more eyes to witness the crime and more people to call the police and hence abetter Reaction Model. For that instance we do a simple linear model in which each observation isthe Smoothed Quadrat Efficiency and we wish to understand the effect that the covariates have onit.

As we can see from the table 5.2 Efficiency increases considerably in a region where thereis more Robbery of a person. This might be due to the correlation between making an arrestand reporting a crime that we discussed previously. Another interesting remark is that SocialDeprivation seems to be a significant covariate in our measure, however, instead of increasing

Page 38: university college london modelling crime in mexico city using

CHAPTER 5. POLICE STRATEGY 31

Table 5.2: Estimates on Police Efficiency linear modelCovariate? Estimate p value

Social Deprivation −6.8e−3 < 2e−16Robbery Intensity 1.5e+3 < 2e−16

Car Theft Intensity −1.1e+3 < 2e−16Violent Car Theft Intensity 1.0e+2 0.35

Shoplift Intensity −5.8e+2 1.8e−6Population Density −1.8e−2 0.9

Adjusted R2 = 0.596?− Smoothed variables

Efficiency as social deprivation index increases -which means less deprivation- it has the oppositebehaviour.

Both Car Theft and Shoplift intensity have a negative impact on Police Efficiency which meansthat the more crime gets reported in a particular spot then police is less efficient, although wewould expect the opposite: more crime attracts more police officers and they achieve an increasedrate of arrests.

5.2.1 Efficiency as explanatory variableIf instead of trying to explain what makes Police Efficiency increase but we take in account theeffect that it has on crime intensity, then we could incorporate it as an explanatory variable to ourmodels, obtaining the following coefficient for that variable:

Table 5.3: Results by incorporating Police Efficiency as a covariate

Crime ModelLinear Models Spatial Models

Ef. Coefficient significance Ef. Coefficient significanceRobbery of a person +4.5e−4 ∗∗∗ 4.7 ∗∗∗

Car theft −1.6e−3 ∗∗∗ −4.8 ∗∗∗Car theft with violence −3.0e−4 −3.3 ∗∗∗

Shoplifting +5.4e−5 ∗ −1.8 ∗∗General crimes +2.1e−3 ∗∗∗ 5.8 ∗∗

Significance ∗∗∗< .001, ∗∗< .01 and ∗< .05

Is important to notice from table 5.3 that thanks to the spatial modelling we could incorporateEfficiency as a significant covariate into Car theft with violence, which was a variable without anysignificance in the linear model.

On the downside we can see that the effect of the variable when modelling Shoplifting ispositive in the linear model and negative in the spatial one, both with sufficient significance andcould be due to the fact that Shoplifting is a crime that is naturally bounded and that occurs inclustered areas. From the 2,432 areas that we analyse with traditional models there are 44% thatdid not registered any crime of this type during the year which we are focusing, so we are modellingin many cases crime intensity that is exactly zero.

We can see from the smoothed residuals of the spatial model for Robbery of a person, that aswe proceeded before with more covariates in Chapter 3 (figure 3.13) the model gets a better fit,and now, with Efficiency (figure 5.3) the spatial model gets a much better approximation.

5.3 Measuring the strategySpatial Statistics has proven yet again to be a powerful tool to do an analysis in which observationshave an impact on those that are close to them. The effect of Police Efficiency is an interestingone when we think of crime as a dynamic series of events in which there are two players doingiterative strategies. One the one side police officers are motivated to reduce, prevent or react tocrime, and on the other side criminals try to commit a crime without being caught. We can see thatfor a crime that is committed by organised structures rather than opportunists like Car theft, they

Page 39: university college london modelling crime in mexico city using

CHAPTER 5. POLICE STRATEGY 32

Figure 5.3: Smoothed residuals from spatial model

do take in account the chances of commiting a crime without being captured and Police Efficiencypushes them to areas without that many officers.

The impact of Police Efficiency on crime and the impact of crime on Efficiency should alsobe analysed considering the time variable in its different ways of measuring it. Just like criminalschoose to execute a crime in an area with less police effectiveness they might also choose to commita crime when Efficiency drops. Due to time restriction that analysis is left for further research.

Page 40: university college london modelling crime in mexico city using

Chapter 6Conclusions

Before jumping into conclusions we first understand some of the statements that were briefly dis-cussed in the previous chapters.

6.1 Security MeasuresAs a result of the model we saw previously we conclude that there is strong evidence that shows aneffect of the following variables in the expected crime intensity. Here we report also the correlationestimated for the 2,432 geographic areas mentioned in Chapter 3, and the most dominant effectbased not only on the sign but also on the magnitude of the estimated coefficients, and in thespatial case, the smoothed version of the variables.

6.1.1 Distance to centreEffect of distance to centre

Crime Correlation Linear SpatialRobbery of a person -0.49 + –

Car theft -0.15 – –Violent Car theft -0.06 – +

Robbery of a business -0.24 + –General crimes -0.41 – –

Although is impossible to determine the position of each person in the city and then use thatinformation to estimate the crime intensity as a function of the amount of people, this variablehelps us to incorporate an effect of the concentration of people in different times of the day. Evenwhen people don’t necessarily travel to the centre of the city in its daily commute, many routes goacross that area and so this variable helps us to understand the effect of concentration of people.

In the linear model the variable was introduced in its original effect and squared one and ishighly correlated with other variables, particularly with distance to a Public Transportation Station.For that reason, although the correlation is negative between the variable and Crime Intensity, itenters the model with a positive overall effect in some of the models.

6.1.2 Distance to public transportationEffect of distance to public transportation

Crime Correlation Linear SpatialRobbery of a person -0.42 – –

Car theft -0.25 – –Violent Car theft -0.21 – –

Robbery of a business -0.30 – –General crimes -0.45 – –

Like the previous variable, this helps us to consider the effect that more people have in the crimeintensity, only in this case we allowed to have more than 200 spots that attract people representedin each station, with different levels of relevance depending on the type of transportation that weare talking about. In every case being closer to a station increases the crime.

33

Page 41: university college london modelling crime in mexico city using

CHAPTER 6. CONCLUSIONS 34

6.1.3 Contains a Public Transportation StationEffect of the variable contains a station

Crime Correlation Linear SpatialRobbery of a person +0.29 + +

Car theft +0.07 – –Violent Car theft +0.08 ◦ –

Robbery of a business +0.23 + ◦General crimes +0.26 ◦ –

Here by ◦ we mean that for some type of stations the sign is positive and for some is negative.Again, due to correlation with some variables like distance to city centre, the effect is in somecases positive and others negative, however, the areas with a station have increased crime intensity.

6.1.4 Social DeprivationEffect of Social Deprivation

Crime Correlation Linear SpatialRobbery of a person -0.01 – –

Car theft +0.18 + +Violent Car theft +0.05 – +

Robbery of a business +0.06 – +General crimes +0.06 · –

In this case, by · we mean that the variable was dropped. The effect of deprivation is differentacross the different types of crime, and particularly for the two most frequent crimes, which areRobbery of a person and Car Theft the effect is the opposite, which is why for the general modelthe variable seems unimportant.

6.1.5 Police EfficiencyEffect of Police Efficiency

Crime Correlation Linear SpatialRobbery of a person +0.27 + +

Car theft -0.05 – –Violent Car theft -0.02 – –

Robbery of a business +0.07 + –General crimes +0.14 + +

It is not so straight forward to assume that Efficiency has an impact on crime intensity or ifcrime intensity increases and modify police efforts or both. It is possible that criminals choosewhere to act in function to the number of police officers and the risk of being captured in one areafrom their personal believes, but we also know that police strategy is modified and improved basedon criminal reports, so it is more feasible that there is a dynamic interaction between those two.

6.1.6 Population DensityEffect of Population Density

Crime Correlation Linear SpatialRobbery of a person +0.18 + to – –

Car theft +0.29 + to – ◦Violent Car theft +0.19 + +

Robbery of a business +0.02 – –General crimes +0.32 + to – –

Here again by ◦ we mean that the effect of the covariate is mixed since for that model both theoriginal and the smoothed version entered the model with opposite sign.

The effect that population density has in crime has been discussed previously by many otherstudies [Christens and Speer, 2005]. It has been argued that an increased density could also in-crease crime levels based on overcrowding and antisocial behaviours, because there could be anassociation between poverty and density or because it increases the opportunities to commit the

Page 42: university college london modelling crime in mexico city using

CHAPTER 6. CONCLUSIONS 35

felony. However it was also proposed that more density also implies more eyes and more windowsso an effect of neighbourhood surveillance works diminishing crime intensity. In the particularcase of Mexico City we can see a non-linear effect of crime intensity in which crime increaseswith density up to a certain point in which more population implies less crime. We cannot gener-alise from this behaviour that this will happen in other urban areas, since this variable obeys othercharacteristics from the particular urban area that was analysed.

An interesting remark is that an estimate for the risk of a person suffering a crime in a particulararea could be given by

Risk =Crime Intensity

Population Density,

where the measure is given for that area. We know that in fact this is just a rough approxima-tion since population density is only a measure of the amount of people living there and not theactual number of people that live, study, work, commute or visit that area. For this very simplisticapproximation, where Crime Intensity is a function of Population Density, we obtain that the Riskof being a victim of a crime is, as a function of D the population density, given by

Risk(D) =T +αD+βD2

D

=TD+α +βD,

where T > 0 stands for the remaining effects of the model. The value for β < 0 which meansthat from this simple model, the risk of being a victim of a crime always gets smaller as the densityincreases.

Leaving the rest of the covariates fixed, the place in which a person in Mexico City is in moreRisk of being a victim of a crime are those areas with less people.

6.2 Areas to improve the modelsThe areas to improve the models are divided in three major categories: improving observations,adding new variables and considering another data frame.

6.2.1 Improving ObservationsOne of the hardest issues with the current situation of security in Mexico is that according to aNational survey less than 10% of the crimes are reported, so the model is biased to the type ofcrimes and regions that tend to report their crimes.

Not only our observations are biased but it is also hard to generalise the effect of some ofthe covariates that were introduced to our models to other urban spaces. We can conclude thatdensity, for example, has a strong quadratic effect on crime intensity in Mexico City, but it wouldbe impossible to try to generalise that behaviour to, for example London, since it might dependmore on the particularities from that city. It would be important to analyse the effect of this variablein different urban areas and with other characteristics to be able to conclude that density has thateffect on crime intensity.

6.2.2 New Variables• CITY CENTRE

Some of the variables that were incorporated to the model were intended to estimate theeffect that some places that attract people have on crime, like distance to city centre. How-ever in Mexico City, just as many other urban areas, there are many poles that attract a hugeamount of people, like the financial district in the West or the biggest University from LatinAmerica in the South part of the city, so it would be an improvement of the model to consideralso the distance to those places.

• PUBLIC TRANSPORTATION

There are two reasons to incorporate public transportation to our model, the first is that theyprovide mobility to the criminal and it is possible that they choose an area near to a station

Page 43: university college london modelling crime in mexico city using

CHAPTER 6. CONCLUSIONS 36

to act. The second reason to incorporate the variable is that it helps us to identify areas withan increased amount of people. In that sense, we could try to split the effect in two variables,one that simply measures the distance to the nearest station and the other that estimates thenumber of people at that spot.

Particularly in Mexico City there are three Metro stations with more than 100,000 users perday, one even with just a little bit more than 300,000 whilst there are 25 stations that haveless than 10,000 passengers per day, so there are stations with 100 times more passengersthan others, but now our model weights the same those stations.

• SECURITY RESOURCES

It would be important to incorporate to the model the position of resources, like securitycameras, patrols or a measure of police intensity like officers per squared kilometre to fullyunderstand their Efficiency.

• VALUE OF THE PROPERTY STOLEN

Robbery of a person is treated as the same type of felony, however, some of those crimesare just opportunists, which is why they are committed close to public transportation stationsand they are likely to be for a small amount of money or a cell phone. However, other typeof those crimes is when the victim is studied and targeted by the criminal, and perhaps thevictim is followed by a number of blocks until the criminal executes, in which case the crimeis not so opportunist and is likely to be for a much larger amount of money. We could treatthis covariate with different levels to model opportunist crime in a different way.

• OTHER VARIABLES

Not only should we incorporate variables like the amount of people in the public transporta-tion but we could also try to take in account the location of schools, colleges and universitiesand the amount of students they have, as well as commercial areas and their size or workingbuildings and their size to estimate as precise as possible the amount of people that there ison every region.

6.2.3 Another Data FrameAlthough crimes might occur in most of the places they are committed mostly in restricted areas.Particularly Robbery of a person happens in streets and the entrance to public transportation sta-tions, car thefts in streets and car parks and shoplifts only in commercial areas. Hence, it would beimportant to consider those restrictions in our model.

For example, we rejected in the previous chapters that Shoplifting happens in random placesand we did a formal test against it. It is possible however that a shop is the victim of a crime byrandom and that their probability is statistically the same for all the shops, but the distribution ofcommercial areas is the one that is not random, hence the position of this particular type of crimeis random conditionally upon their position.

In the same way it would be a great improvement to consider a network analysis for crimes thatare basically restricted to streets [Davies and Bishop, 2013] to determine some covariates. Partic-ularly the way we measure distance, for example to the nearest station of public transportation,when restricted to a network [Okabe and Sugihara, 1964] we can get considerably different mea-surements, or measured as the time that takes to go from one place to the other, much more preciseand closer to reality.

Page 44: university college london modelling crime in mexico city using

Appendix AEstimation of Parameters

A.1 Estimation of parametersThe model contains some parameters that needed to be estimated and that using different valuescould change the results and their interpretation. For that reason a procedure was executed to avoidchoosing a value that might not be the best one.

The distance to the city centre and the effect of the distance to public transportation wastrimmed with the following equation

di = min{d(C0,Ci),Mt}

where Mt is the value that trims down the variable. The value of each of the thresholds wasestimated with the following procedure.

1. Generate possible values for the value of Mt within a reasonable range

2. Compute the distances using that threshold.

3. Estimate the linear model and determine the value for the R2 of that model.

4. Determine the distance that attains that maximum possible R2 and set it as the new value forMt .

5. Repeat the procedure with that variable fixed at the maximum and changing another one ofthe parameters.

Since there is possible interaction between the covariates it is reasonable to repeat the previousalgorithm several times with the other parameters fixed at the maximum value.

Other parameters, like the smoothing one, was estimated similarly.

37

Page 45: university college london modelling crime in mexico city using

Appendix BTable of Results

B.1 Distance parametersThe model includes a trimmed distance that depends on a parameter. Its value was estimatedindependently by each type of crime following the procedure mentioned previously, obtaining thefollowing results:

Table B.1: Distance Parameters for the crime modelsGeneral Robbery Car Violent Violent

Parameter Model of a person Theft Car Theft ShopliftDistance to centre 4,291m 5,952m 4,309m 3,461m 6,013m

Distance to general station 969m 872m 1,213m 1,183m 872mDistance to Metro station 6,088m 5,655m 5,979m 5,465m 5,665m

Distance to MetroBus station 8,255m 10,841m 7,465m 6,037m 10,841mDistance to Tram station 2,614m 16,670m 7,671m 3,193m 16,670m

38

Page 46: university college london modelling crime in mexico city using

APPENDIX B. TABLE OF RESULTS 39

GENERAL CRIMES

The estimates for the model for General Crimes, which include all the types, are the following,and are separated in the linear model and the spatial one.

Table B.2: Estimates for the General crimes in the linear modelSign Estimate significance

Intercept + 1.6e−2 ∗∗∗Density + 2.0e−2

Density2 – 1.5e−2Distance to Centre – 1.1e−6 ∗∗∗

Distance to Centre2 · · ·Distance to Metro St – 4.4e−7 ∗∗∗

Distance to MetroBus St – 2.5e−7 ∗∗∗Distance to Tram St – 3.3e−7 ∗∗Distance to Station – 1.3e−6 ∗∗∗

Contains Metro Station · · ·Contains MetroBus Station – 7.0e−4 ∗

Contains Tram Station · · ·Contains General Station + 8.2e−4 ∗∗∗

Deprivation · · ·Density : Distance St + 6.7e−5 ∗∗∗Density2: Distance St + 8.1e−6

Density : Distance Centre – 5.2e−6Density2: Distance Centre – 7.7e−6

Density : Deprivation · · ·Density2: Deprivation · · ·

The estimates for the spatial model are:

Table B.3: Estimates for the General crimes in the spatial modelSign Estimate significance

Intercept – 8.1e+0 ∗∗∗Density · · ·

Smooth Density – 6.6e+0Distance To Centre – 3.9e−4 ∗∗∗

Distance to Metro Station · · ·Distance to MetroBus Station · · ·

Distance to Tram Station · · ·Distance to General Station – 8.4e−4 ∗∗∗

Contains Metro Station – 1.2e−1 ∗∗∗Contains MetroBus Station · · ·

Contains Tram Station · · ·Contains General Station · · ·

Social Deprivation · · ·Smooth Social Deprivation + 2.9e−2 ∗∗∗

Smooth Density : Smooth Deprivation · · ·Smooth Density : Distance to Centre + 1.2e−2 ∗∗∗Smooth Density : Distance to Station + 1.1e−2 ∗

Page 47: university college london modelling crime in mexico city using

APPENDIX B. TABLE OF RESULTS 40

ROBBERY OF A PERSON

The estimates for the model for Robbery of a Person are:

Table B.4: Estimates for Robbery of a person in the linear modelSign Estimate significance

Intercept + 5.4e−4 ∗∗∗Density + 4.1e−4

Density2 – 1.5e−4Distance to Centre – 3.2e−3 ∗∗∗

Distance to Centre2 + 3.1e−3 ∗∗∗Distance to Metro St – 2.1e−8 ∗∗∗

Distance to MetroBus St – 1.0e−8 ∗∗∗Distance to Tram St + 3.3e−9 ∗∗∗Distance to Station – 2.4e−7 ∗∗∗

Contains Metro Station + 1.4e−4 ∗∗∗Contains MetroBus Station · · ·

Contains Tram Station · · ·Contains General Station – 4.6e−5 ∗

Deprivation – 8.9e−6 ∗∗Density : Distance St + 2.5e−6 ∗Density2: Distance St – 1.2e−6

Density : Distance Centre · · ·Density2: Distance Centre · · ·

Density : Deprivation · · ·Density2: Deprivation · · ·

The estimates for the spatial model are:

Table B.5: Estimates for Robbery of a person in the spatial modelSign Estimate significance

Intercept – 8.2e+0 ∗∗∗Density – 5.3e+0

Smooth Density – 3.5e+0Distance To Centre – 2.9e−4 ∗∗∗

Distance to Metro Station · · ·Distance to MetroBus Station · · ·

Distance to Tram Station – 1.7e−5 ∗∗∗Distance to General Station – 1.8e−3 ∗∗∗

Contains Metro Station + 1.5e−1 ∗∗∗Contains MetroBus Station · · ·

Contains Tram Station · · ·Contains General Station · · ·

Social Deprivation · · ·Smooth Social Deprivation – 1.1e−1 ∗∗∗

Smooth Density : Smooth Deprivation · · ·Smooth Density : Distance to Centre + 4.9e−3 ∗∗∗Smooth Density : Distance to Station + 4.0e−2 ∗∗∗

Page 48: university college london modelling crime in mexico city using

APPENDIX B. TABLE OF RESULTS 41

CAR THEFT

The estimates for the model for Car Theft are:

Table B.6: Estimates for Car Theft in the linear modelSign Estimate significance

Intercept + 4.6e−3 ∗∗∗Density + 3.3e−2

Density2 – 4.3e−3Distance to Centre + 1.4e−8

Distance to Centre2 – 8.2e−3 ∗∗∗Distance to Metro St – 2.6e−7 ∗∗∗

Distance to MetroBus St – 1.4e−7 ∗∗∗Distance to Tram St · · ·Distance to Station – 2.0e−7

Contains Metro Station – 9.9e−4 ∗∗Contains MetroBus Station – 7.7e−4 ∗

Contains Tram Station · · ·Contains General Station + 9.7e−4 ∗

Deprivation + 1.9e−4 ∗∗∗Density : Distance St + 2.1e−5 ∗∗Density2: Distance St + 1.9e−5 ∗

Density : Distance Centre – 8.0e−6Density2: Distance Centre – 8.6e−6

Density : Deprivation + 3.13−3 ∗Density2: Deprivation – 2.4e−3

The estimates for the spatial model are:

Table B.7: Estimates for Car Theft in the spatial modelSign Estimate significance

Intercept – 1.1e+1Density + 2.2e+1 ∗∗∗

Smooth Density – 1.7e+1Distance To Centre – 1.2e−4 ∗

Distance to Metro Station + 9.4e−5 ∗∗∗Distance to MetroBus Station · · ·

Distance to Tram Station + 1.5e−5Distance to General Station – 4.0e−4 ∗

Contains Metro Station – 3.1e−1 ∗∗∗Contains MetroBus Station · · ·

Contains Tram Station · · ·Contains General Station · · ·

Social Deprivation + 3.8e−2Smooth Social Deprivation + 2.5e−2

Smooth Density : Smooth Deprivation + 6.8e−0 ∗Smooth Density : Distance to Centre + 7.4e−3 ∗∗Smooth Density : Distance to Station · · ·

Page 49: university college london modelling crime in mexico city using

APPENDIX B. TABLE OF RESULTS 42

VIOLENT CAR THEFT

The estimates for the model for Violent Car theft are:

Table B.8: Estimates for Violent Car Theft in the linear modelSign Estimate significance

Intercept + 2.9e−3 ∗∗∗Density + 5.6e−2 ∗∗

Density2 + 1.2e−2Distance to Centre + 3.3e−7 ∗

Distance to Centre2 – 7.9e−3 ∗∗∗Distance to Metro St – 2.5e−7 ∗∗∗

Distance to MetroBus St – 1.7e−7 ∗∗∗Distance to Tram St – 2.7e−7 ∗∗∗Distance to Station + 2.6e−7

Contains Metro Station · · ·Contains MetroBus Station – 6.6e−4 ∗∗

Contains Tram Station · · ·Contains General Station + 5.1e−4 ∗∗

Deprivation – 1.9e−6Density : Distance St + 1.5e−5 ∗Density2: Distance St + 1.7e−5 ∗

Density : Distance Centre – 1.5e−5 ∗Density2: Distance Centre – 1.2e−5

Density : Deprivation – 3.6e−3 ∗Density2: Deprivation – 2.2e−3

The estimates for the spatial model are:

Table B.9: Estimates for Violent Car Theft in the spatial modelSign Estimate significance

Intercept – 1.2e+1Density · · ·

Smooth Density + 4.9e+1 ∗∗∗Distance To Centre + 2.6e−4 ∗∗∗

Distance to Metro Station – 1.2e−4Distance to MetroBus Station – 4.5e−5 ∗

Distance to Tram Station – 2.3e−4 ∗∗∗Distance to General Station – 6.5e−4 ∗∗

Contains Metro Station – 2.3e−1 ∗∗Contains MetroBus Station · · ·

Contains Tram Station · · ·Contains General Station · · ·

Social Deprivation · · ·Smooth Social Deprivation + 4.8e−2

Smooth Density : Smooth Deprivation · · ·Smooth Density : Distance to Centre · · ·Smooth Density : Distance to Station + 2.2e−2

Page 50: university college london modelling crime in mexico city using

APPENDIX B. TABLE OF RESULTS 43

SHOPLIFT

The estimates for the model of Robbery of a business are:

Table B.10: Estimates for Robbery of a business in the linear modelSign Estimate significance

Intercept + 2.4e−4 ∗∗∗Density – 6.9e−4

Density2 – 1.8e−3 ∗∗Distance to Centre – 1.3e−3 ∗∗∗

Distance to Centre2 + 1.9e−4Distance to Metro St – 5.9e−8 ∗∗

Distance to MetroBus St – 1.1e−8 ∗∗∗Distance to Tram St – 2.6e−8 ∗Distance to Station 2.5e−9

Contains Metro Station · · ·Contains MetroBus Station · · ·

Contains Tram Station · · ·Contains General Station + 3.9e−5 ∗∗∗

Deprivation – 1.5e−6Density : Distance St + 1.2e−6 ∗∗∗Density2: Distance St + 5.2e−7 ∗

Density : Distance Centre · · ·Density2: Distance Centre · · ·

Density : Deprivation – 3.1e−4 ∗∗Density2: Deprivation – 5.2e−5

The estimates for the spatial model are:

Table B.11: Estimates for Shoplift in the spatial modelSign Estimate significance

Intercept – 8.0e−0Density · · ·

Smooth Density – 3.6e+1 ∗Distance To Centre – 4.4e−4 ∗∗∗

Distance to Metro Station – 9.4e−4 ∗∗∗Distance to MetroBus Station – 8.9e−5 ∗∗∗

Distance to Tram Station – 7.9e−4 ∗∗∗Distance to General Station · · ·

Contains Metro Station – 1.6e−1 ∗Contains MetroBus Station · · ·

Contains Tram Station · · ·Contains General Station · · ·

Social Deprivation – 6.6e−2Smooth Social Deprivation + 2.7e−1 ∗∗

Smooth Density : Smooth Deprivation – 9.2e−0Smooth Density : Distance to Centre + 1.8e−2 ∗∗∗Smooth Density : Distance to Station · · ·

Page 51: university college london modelling crime in mexico city using

Bibliography

[Baddeley, 2010] Baddeley, A. (2010). Analysing spatial point patterns in R. CSIRO.

[Baddeley and Turner, 2005] Baddeley, A. and Turner, R. (2005). spatstat: An R package foranalyzing spatial point patterns. Journal of Statistical Software, 12(6):1–42.

[Christens and Speer, 2005] Christens, B. and Speer, P. (2005). Predicting violent crime usingurban and suburban densities. Behavior and Social Issues, 14(14).

[Davies and Bishop, 2013] Davies, T. and Bishop, S. (2013). Modelling patterns of burglary onstreet networks. Crime Science Journal.

[Diggle, 2014] Diggle, P. (2014). Statistical Analysis of Spatial and Spatio-Temporal Point Pat-terns. CRC Press, Florida, US., third edition edition.

[from INEGI, 2012] from INEGI, O. W. (2012). Victimisation survey, 2012. http:

//www.inegi.org.mx/inegi/contenidos/espanol/prensa/Boletines/Boletin/

Comunicados/Especiales/2013/septiembre/comunica15.pdf. Accessed on August2014.

[Okabe and Sugihara, 1964] Okabe, A. and Sugihara, K. (1964). Spatial Analysis along Networks.Statistical and Computational Methods. John Wiley and Sons, Sussex, UK., first edition edition.

[R Core Team, 2013] R Core Team (2013). R: A Language and Environment for Statistical Com-puting. R Foundation for Statistical Computing, Vienna, Austria.

[Website from ICESI, 2009] Website from ICESI, O. (2009). Victimizacion e incidencia de lacifra negra en mexico. https://www.oas.org/dsp/documents/victimization_surveys/mexico/mexico_analisis_ensi6.pdf. Accessed on August 2014.

[Website from INEGI, 2010] Website from INEGI, O. (2010). 2010 census data. http://www.

inegi.org.mx/. Accessed on July 2014.

[Website Metro Mexico City, 2014] Website Metro Mexico City, O. (2014). Operations report,2013. http://www.metro.df.gob.mx/operacion2/cifrasoperacion.html. Accessed onJuly 2014.

[Website MetroBus Mexico City, 2014] Website MetroBus Mexico City, O. (2014). Metrobusroute. http://www.metrobus.df.gob.mx/mapa.html. Accessed on July 2014.

[Website Open Data Mexico City, 2014] Website Open Data Mexico City, O. (2014). Public in-formation centre in mexico. http://datosabiertos.df.gob.mx/. Accessed on August2014.

44

Page 52: university college london modelling crime in mexico city using

THE WORD COUNT FOR THE PRESENT DOCUMENT IS:

Abstract 285

Chapter 1 1,472

Chapter 2 3,432

Chapter 3 4,295

Chapter 4 910

Chapter 5 1,698

Chapter 6 1,896

Appendix 462

Total 14,450