drsummary: Performs a summary of a set of differential risk hotspots...

View source: R/drsummary.R

drsummaryR Documentation

Performs a summary of a set of differential risk hotspots located along a linear network

Description

This function provides a basic summary of each differential risk hotspot provided in the object hotspots passed to the function. This includes the proportion of the type of event in each hotspot, the total length of the hotspot, a type-specific prediction accuracy index (PAI_t). Furthermore, this summary is also provided for an extension of each of the hotspots

Usage

drsummary(
  X,
  rel_probs,
  hotspots,
  order_extension = NULL,
  compute_p_value = F,
  n_it = 40
)

Arguments

X

- A lpp object representing a marked point pattern lying on a linear 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

hotspots

- A set of differential risk hotspots obtained with the function DiffHotspots_n_k

order_extension

- A natural number indicating a neighbourhood order to be used for constructing an extension of the differential risk hotspots. The summary is also given for the segments forming this extension

compute_p_value

- A logical value allowing the user to compute a p-value representing the statistical significance of each differential risk hotspot. It is set to FALSE by default

n_it

- Number of simulations performed for the estimation of the p-value (if compute_p_value = T)

Value

Returns a data.frame providing a summary of a set of differential risk hotspots. Each row of the output corresponds to one hotspot

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)
hotspots_summary <- drsummary(X = chicago, rel_probs = rel_assault, 
hotspots = hotspots_assault)

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

Related to drsummary in DRHotNet...