Movatterモバイル変換


[0]ホーム

URL:


Title:Differential Risk Hotspots in a Linear Network
Version:2.3
Author:Alvaro Briz-Redon
Maintainer:Alvaro Briz-Redon <alvaro.briz@uv.es>
Description:Performs the identification of differential risk hotspots (Briz-Redon et al. 2019) <doi:10.1016/j.aap.2019.105278> along a linear network. Given a marked point pattern lying on the linear network, the method implemented uses a network-constrained version of kernel density estimation (McSwiggan et al. 2017) <doi:10.1111/sjos.12255> to approximate the probability of occurrence across space for the type of event specified by the user through the marks of the pattern (Kelsall and Diggle 1995) <doi:10.2307/3318678>. The goal is to detect microzones of the linear network where the type of event indicated by the user is overrepresented.
Depends:R (≥ 3.5.0)
Imports:graphics, grDevices, PBSmapping, raster, sp, spatstat.geom,spatstat.linnet, spatstat (≥ 2.0-0), spdep, stats, utils
License:GPL-2
LazyData:true
RoxygenNote:7.1.1
Suggests:knitr, rmarkdown
NeedsCompilation:no
Repository:CRAN
Packaged:2023-07-16 21:22:51 UTC; Usuario
Date/Publication:2023-07-16 21:40:06 UTC

Creates the neighbourhood structure of a linear network

Description

Given a linear network structure, this function creates the neighbourhood matrix ("queen" criterion) associated to it. Two segments of the network are neighbours if they share a vertex

Usage

NeighbourhoodMatrixNetwork(network)

Arguments

network

- Alinnet object representing a linear network structure

Value

Returns alistw object in"W" style

Examples

library(DRHotNet)library(spatstat.geom)library(spatstat.linnet)library(spdep)library(raster)chicago_neighbourhood <- NeighbourhoodMatrixNetwork(chicago$domain)class(chicago_neighbourhood)chicago_neighbourhood$neighbours[[1]]

Marked point pattern on a road network simulating traffic accident locations

Description

A simulatedlpp object representing traffic accidents lying on a road structure. The pattern is marked, with the following marks:Collision,Bicycle,Car,Lorry,Motorcycle,Public.bus,Private.bus andVan. The markCollision is a factor, with the following possible values:Crossing,Fixed-object,Rear-end,Run-off-road,Run-over,Side. The remaining marks are numeric and binary

Usage

SampleMarkedPattern

Format

An object of classlpp (inherits fromppx) of length 3.


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 ink times the standard deviation of the complete set of probabilities estimated across all the segments of the network, and 2) there aren or more events at a distance belowh from the middle point of the segment (h is obtained from the objectrel_probs computed with the functionrelpnet). In summary,k andn 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 fork orn (or both) represents a more strict criterion and leads to a lower number of differential risk hotspots being detected. Users should test several values ofk andn (sensitivity analysis onk andn) in order to reach reasonable choices for the research or practical purposes of their data analyses. This sensitivity analysis can be carried out with thedrsens function

Usage

drhot(X, rel_probs, k, n, dist = "path", event_distances = NULL)

Arguments

X

- Alpp 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 inX, generated through the functionrelpnet

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:path (shortest-path distance) andeuclidean (Euclidean distance). By default, the shortest-path distance is used. Change toeuclidean to reduce the computation time or skip memory issues

event_distances

- A matrix that contains the distances between the middle points of the segments satisfying the condition on parameterk and the events oX. By default it is set toNULL

Value

Returns a list that contains the differential risk hotspots found forX and the type of event specified byrel_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)

Performs a sensitivity analysis on the parametersk andn that are provided todrhot

Description

Given a set ofks andns parameters, this function allows the user to perform a sensitivity analysis on the parametersk andn by callingdrhot for each combination ofk andn

Usage

drsens(X, rel_probs, ks, ns)

Arguments

X

- Alpp 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 inX, generated through the functionrelpnet

ks

- A numeric vector of possible values for thek parameter that is provided todrhot

ns

- A numeric vector of possible values for then parameter that is provided todrhot

Value

A matrix providing the type-specific prediction accuracy index that corresponds to the set differential risk hotspots obtained for each value ofk orn provided inks andns, respectively. ANA value in this matrix indicates that no differential risk hotspots are found for the corresponding combination ofk andn

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

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

- Alpp 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 inX, generated through the functionrelpnet

hotspots

- A set of differential risk hotspots obtained with the functionDiffHotspots_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 (ifcompute_p_value =T)

Value

Returns adata.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)

Plots an object obtained withDiffHotspots_n_k

Description

This function plots a set of differential risk hotspots located along a linear network. An extension of the hotspots (including the kth order neighbours of the segments of the hotspots) is also plotted

Usage

plothot(X, hotspots, order_extension = NULL, which.plot = NULL, eps_image = F)

Arguments

X

- Alpp object representing a marked point pattern lying on a road network (linnet object)

hotspots

- A set of differential risk hotspots obtained with the functionDiffHotspots_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

which.plot

- A numeric vector indicating which differential risk hotspots to plot (according to the way they are ordered inhotspots)

eps_image

- If set toTRUE, an .eps image is generated. By default it is set toFALSE

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)plothot(X = chicago, hotspots = hotspots_assault)

Plots an object obtained withrelpnet

Description

This function plots the relative probability of occurrence of a type of event along a linear network

Usage

plotrelp(X, rel_probs, eps_image = F)

Arguments

X

- Alpp 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 inX, generated through the functionrelpnet

eps_image

- If set toTRUE, an .eps image is generated. By default it is set toFALSE

Examples

library(DRHotNet)library(spatstat.geom)library(spatstat.linnet)library(spdep)rel_assault <- relpnet(X = chicago, lixel_length = 50, h = 50, mark = "marks", category_mark = "assault")plotrelp(X = chicago, rel_probs = rel_assault)

Computes the relative probability of observing a type of event along a linear network

Description

Given a marked point pattern lying on a linear network structure, this function uses kernel density estimation (KDE) to estimate a relative probability of occurrence for a type of event specified by the user through the marks of the pattern. The marks of a point pattern represent additional information of the events that are part of the pattern

Usage

relpnet(X, lixel_length, h, mark, category_mark, finespacing = F)

Arguments

X

- Alpp object representing a marked point pattern lying on a linear network (linnet object)

lixel_length

- A numeric value representing a lixel length that will be used for creating a split version of the network contained inX. Then, the length of all the segments of the split network is belowlixel_length

h

- A numeric value representing the bandwidth parameter (in meters)

mark

- Mark ofX that is used to characterize the type of event. The algorithm searches microzones of the network where this mark is over- or underrepresented

category_mark

- A numeric/character value from the set allowed in the chosenmark to compute the relative probability in relation to it

finespacing

- A logical value specifying whether to use a finer spatial resolution (with longer computation time but higher accuracy). It is set to FALSE by default

Value

Returns a list that contains the relative probability values estimated along the network for the type of event specified bymark andcategory_mark

References

Baddeley, A., Rubak, E., & Turner, R. (2015). Spatial point patterns: methodology and applications with R. Chapman and Hall/CRC.

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.

Diggle, P. J. (2013). Statistical analysis of spatial and spatio-temporal point patterns. Chapman and Hall/CRC.

Kelsall, J. E., & Diggle, P. J. (1995). Kernel estimation of relative risk. Bernoulli, 1(1-2), 3-16.

McSwiggan, G., Baddeley, A., & Nair, G. (2017). Kernel density estimation on a linear network. Scandinavian Journal of Statistics, 44(2), 324-345.

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

[8]ページ先頭

©2009-2025 Movatter.jp