Skip to main content

Section 10.6 Exploring near repeat victimisation

Although a good deal of the near repeat victimisation literature focuses on burglary, our Manchester data is not good for illustrating the analysis of near repeat victimisation. For this we need data with more granular time information than the month in which it took place (the only one available from UK open data police portals). So we will return to the burglary data we explored in Chapter 7 when introducing spatial point pattern analysis. Remember, though, that there is a good deal of artificial "revictimisation" in those files for the way that geomasking is introduced. So although we can use that data for illustration purposes, beware the results we will report cannot be trusted as genuine.
# Large dataset, so it will take a while
nyc_burg <- get_crime_data(
  cities = "New York", #specifies the city for which you want the data
  years = 2010,        #reads the appropriate year of data
  type = "extended",   #select extended (a fuller set of fields)
  output = "sf") %>%        #Specify you want a sf object with WGS84
  dplyr::filter(offense_type == "residential burglary/breaking & entering" &
           nyc_boro_nm == "MANHATTAN")
manhattan <- st_read("data/manhattan.geojson", quiet=TRUE) %>%
  filter(BoroName == "Manhattan")
manhattan <- st_transform(manhattan, 32118)
nyc_burg <- st_transform(nyc_burg, 32118)
The NearRepeat package uses the Knox test for space time clustering, which has been around since 1964. This test whether there is a significant cluster within a defined distance and time period. The Knox algorithm counts the pair of points within a specified space and time interval and compares this to the expected number of points. "If many of the cases that are ’close’ in time are also ’close’ in space or vice versa, then there is space-time interaction" ([Kulldorff and Hjalmars, 1999]). The idea underpinning the test, as highlighted by [Mantel (1967)], is that "if there is time-space clustering, cases in a cluster will be close both in time and space, while unrelated cases will tend to have a larger average separation in time and space." (p. 209).
The NearRepeat package is quite straightforward with just a couple of functions, as we will see. The key function is NearRepeat() that takes as inputs the data (a vector with the \(x\) coordinates, a vector with the \(y\) coordinates, and a vector with the time information, which can be an integer, numeric or date). You then need to specify the time and the spatial intervals. Ratcliffe (2020) indicates that:
The number of spatial bands is dependent on how far you expect a pattern of near repeats to extend. For example, most environmental criminology research suggests that near repeat patterns occur for only a few blocks or a few hundred metres at most. Any effects appear to peter out beyond this distance. Adding additional bands beyond any identified effects rarely adds much value; however the program is often most effective when you experiment with various settings. For fairly large data sets, ten spatial bands is often a good starting point, though experimentation is encouraged... Be advised that selecting too many bands or too narrow a bandwidth can reduce the number of observations in each category and potentially limit the findings by creating too many categories with low (or zero) values in the observed or expected matrices.
And likewise for the temporal bands:
The number of temporal bands is dependent on how long you expect a pattern of near repeats to extend. For example, the research on repeat victimization suggests that a risk of repeat burglary increases rapidly after an initial burglary, but that this risk dissipates in the months after the incident and the risk returns to the background (normal level for the area) after a few months. Settings of a 30 day temporal bandwidth with 12 temporal bands, or 14 days with 13 temporal bands (to cover a six month period) are common, but experimentation is encouraged.
The Knox test basically uses these temporal and spatial bands to compute the expected number of pairs of events that are close in time and space and compares this with the observed count. Let’s first prepare the data. We will extract the key vectors to a data frame.
nyc_burg_df <- matrix(unlist(nyc_burg$geometry), ncol = 2, byrow = T)
nyc_burg_df <- as.data.frame(nyc_burg_df)
nyc_burg_df$time <- as.Date(nyc_burg$date_single)
nyc_burg_df <- rename(nyc_burg_df, x = V1, y = V2)
We can then try the test. We look at three temporal intervals of seven days each (defined by tds) and four spatial bands (defined by sds), expressed in metres here. By default, this function relies on the Manhattan distances, but we can also set them to Euclidean if we prefer (method = "euclidean"). The p values are computed using a Monte Carlo simulation approach, so nrep sets the number of simulations we desire. The generic plot() function to the generated object will then generate a heat map with the results of the Knox test.
set.seed(123)
results_knox <- NearRepeat(x = nyc_burg_df$x,
                     y = nyc_burg_df$y,
                     time = nyc_burg_df$time,
                     sds = c(0, 0.1, 100, 200, 400),
                     tds = c(0, 7, 14, 21),
                     nrep = 99)
plot(results_knox)
A grid of boxes three wide and four tall, containing decimal numbers. The vertical axis is labeled ’Spatial distance’, and includes ranges from zero to point one, then to one hundred, then one to two hundred, and finally two to four hundred. The horizontal axis is labeled ’Temporal distance’, and contains three ranges, zero to seven, seven to fourteen, and fourteen to twenty one. A legend to the right is labeled ’p-value’, and matches a gradient from orange to yellow, of p-values from zero to point zero five. The three boxes representing spatial distance nearest to zero are coloured orange, as well as one between one and two hundred, with temporal distance between zero and seven. The rest are white.
Figure 10.6.1. Results of the Knox test
By default, this will plot the cells with significant p values and the Knox ratios based on the mean across simulations that are higher than 1.2 (that is, the observed number of pairs is 20% greater than expected). This default can be changed to various options (as discussed in the vignette for the package).
This test was commonly used in epidemiology for preliminary analysis where an infectious origin is suspected before criminologists started to use it. It is worthwhile noticing that within the epidemiological literature there are known concerns with this test (see [Kulldorff and Hjalmars, 1999] and [Townsley et al., 2003]). One is bias introduced by shifts in the population that, considering the temporal scale typically considered in criminological issues, is not the greatest concern. We also need to worry about arbitrary cut offs and the related problem of multiple comparisons. The near repeat calculator manual suggestion for experimentation around these cut-offs likely exacerbates this problem in the practice of crime analysis. [Townsley et al. (2003)] suggest using past findings reported in the literature to establish the time and space intervals. If there are seasonal effects, this test is not well suited to account for them. Finally, the literature also discusses edge effects. Within the epidemiological literature, several modifications to the Knox test have been proposed, and presumably we will see more of this used by criminologists in the future.
A recent article by [Briz-Redón et al. (2020)] proposes a modification of the traditional Knox test. The classic test assumes that crime risk is homogeneous in time and space, despite the fact that this assumption rarely holds. Their procedures relax this assumption, but have yet to be implemented in an R package.