drhot {DRHotNet} | R Documentation |
Identifies differential risk hotspots along a linear network given a vector of relative probabilities computed over the middle points of the segments of the network
Description
Given a relative probability surface corresponding to the occurrence of a type of event along a linear network, this function filters and groups in hotspots those segments satisfying two conditions: 1) the relative probability in the segment exceeds the average relative probability per segment in k
times the standard deviation of the complete set of probabilities estimated across all the segments of the network, and 2) there are n
or more events at a distance below h
from the middle point of the segment (h
is obtained from the object rel_probs
computed with the function relpnet
). In summary, k
and n
control the formation of differential risk hotspots along the network, given a set of relative probabilities covering the network. The choice of a higher value for k
or n
(or both) represents a more strict criterion and leads to a lower number of differential risk hotspots being detected. Users should test several values of k
and n
(sensitivity analysis on k
and n
) in order to reach reasonable choices for the research or practical purposes of their data analyses. This sensitivity analysis can be carried out with the drsens
function
Usage
drhot(X, rel_probs, k, n, dist = "path", event_distances = NULL)
Arguments
X |
- A |
rel_probs |
- An object containing the relative probabilities of a specific type of event along the linear network contained in |
k |
- A numeric value that controls the procedure of detecting differential risk hotspots (departure from average relative probability), as described above |
n |
- A numeric value that controls the procedure of detecting differential risk hotspots (minimum size for the sample of events implicated in the computation of the relative probabilities), as described above |
dist |
- A character indicating which distance to use. Two values are allowed: |
event_distances |
- A matrix that contains the distances between the middle points of the segments satisfying the condition on parameter |
Value
Returns a list that contains the differential risk hotspots found for X
and the type of event specified by rel_probs
References
Briz-Redon, A., Martinez-Ruiz, F., & Montes, F. (2019). Identification of differential risk hotspots for collision and vehicle type in a directed linear network. Accident Analysis & Prevention, 132, 105278.
Examples
library(DRHotNet)
library(spatstat.geom)
library(spatstat.linnet)
library(spdep)
library(raster)
rel_assault <- relpnet(X = chicago,
lixel_length = 50, h = 50, mark = "marks", category_mark = "assault")
hotspots_assault <- drhot(X = chicago, rel_probs = rel_assault,
k = 0.5, n = 4)