drsens {DRHotNet} | R Documentation |
Performs a sensitivity analysis on the parameters k
and n
that are provided to drhot
Description
Given a set of ks
and ns
parameters, this function allows the user to perform a sensitivity analysis on the parameters k
and n
by calling drhot
for each combination of k
and n
Usage
drsens(X, rel_probs, ks, ns)
Arguments
X |
- A |
rel_probs |
- An object containing the relative probabilities of a specific type of event along the linear network contained in |
ks |
- A numeric vector of possible values for the |
ns |
- A numeric vector of possible values for the |
Value
A matrix providing the type-specific prediction accuracy index that corresponds to the set differential risk hotspots obtained for each value of k
or n
provided in ks
and ns
, respectively. A NA
value in this matrix indicates that no differential risk hotspots are found for the corresponding combination of k
and n
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")
sensitivity_analysis <- drsens(X = chicago, rel_probs = rel_assault,
ks = c(1,2), ns = c(30,40))