drsens: Performs a sensitivity analysis on the parameters 'k' and 'n'...

View source: R/drsens.R

drsensR 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 lpp object representing a marked point pattern lying on a road network (linnet object)

rel_probs

- An object containing the relative probabilities of a specific type of event along the linear network contained in X, generated through the function relpnet

ks

- A numeric vector of possible values for the k parameter that is provided to drhot

ns

- A numeric vector of possible values for the n parameter that is provided to drhot

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))

DRHotNet documentation built on July 26, 2023, 5:18 p.m.

Related to drsens in DRHotNet...