SpatialScan {HDSpatialScan} | R Documentation |
Spatial scan procedure
Description
This function computes the different scan procedures available in the package.
Usage
SpatialScan(
method,
data,
sites_coord = NULL,
system = NULL,
mini = 1,
maxi = nrow(sites_coord)/2,
type_minimaxi = "sites/indiv",
mini_post = NULL,
maxi_post = NULL,
type_minimaxi_post = "sites/indiv",
sites_areas = NULL,
MC = 999,
typeI = 0.05,
nbCPU = 1,
variable_names = NULL,
times = NULL
)
Arguments
method |
character vector. The scan procedures to apply on the data. Possible values are:
|
data |
list of numeric matrices or a matrix or a vector:
|
sites_coord |
numeric matrix. Coordinates of the sites (or the individuals, in that case there can be many individuals with the same coordinates). |
system |
character. System in which the coordinates are expressed: "Euclidean" or "WGS84". |
mini |
numeric. A minimum for the clusters (see type_minimaxi). Changing the default value may bias the inference. |
maxi |
numeric. A Maximum for the clusters (see type_minimaxi). Changing the default value may bias the inference. |
type_minimaxi |
character. Type of minimum and maximum: by default "sites/indiv": the mini and maxi are on the number of sites or individuals in the potential clusters. Other possible values are "area": the minimum and maximum area of the clusters, or "radius": the minimum and maximum radius. |
mini_post |
numeric. A minimum to filter the significant clusters a posteriori (see type_minimaxi_post). The default NULL is for no filtering with a a posteriori minimum. |
maxi_post |
numeric. A maximum to filter the significant clusters a posteriori (see type_minimaxi_post). The default NULL is for no filtering with a a posteriori maximum. |
type_minimaxi_post |
character. Type of minimum and maximum a posteriori: by default "sites/indiv": the mini_post and maxi_post are on the number of sites or individuals in the significant clusters. Other possible values are "area": the minimum and maximum area of the clusters, or "radius": the minimum and maximum radius. |
sites_areas |
numeric vector. Areas of the sites. It must contain the same number of elements than the rows of sites_coord. If the data is on individuals and not on sites, there can be duplicated values. By default: NULL |
MC |
numeric. Number of Monte-Carlo permutations to evaluate the statistical significance of the clusters. By default: 999. |
typeI |
numeric. The desired type I error. A cluster will be evaluated as significant if its associated p-value is less than typeI. By default 0.05. |
nbCPU |
numeric. Number of CPU. If nbCPU > 1 parallelization is done. By default: 1. Ignored for "UG" and "UNP" |
variable_names |
character. Names of the variables. By default NULL. Ignored for the univariate and univariate functional scan procedures. |
times |
numeric. Times of observation of the data. By default NULL. Ignored for the univariate and multivariate scan procedures. |
Value
A list of objects of class ResScanOutput:
Univariate case (UG, UNP): A list of objects of class ResScanOutputUni
Multivariate case (MG, MNP): A list of objects of class ResScanOutputMulti
Univariate functional case (NPFSS, PFSS, DFFSS, URBFSS): A list of objects of class ResScanOutputUniFunct
Multivariate functional case (NPFSS, MPFSS, MDFFSS, MRBFSS): A list of objects of class ResScanOutputMultiFunct
References
For univariate scan statistics:
Inkyung Jung and Ho Jin Cho (2015). A Nonparametric Spatial Scan Statistic for Continuous Data. International Journal of Health Geographics, 14.
Martin Kulldorff and Lan Huang and Kevin Konty (2009). A Scan Statistic for Continuous Data Based on the Normal Probability Model. International Journal of Health Geographics, 8 (58).
For multivariate scan statistics:
Lionel Cucala and Michaël Genin and Florent Occelli and Julien Soula (2019). A Multivariate Nonparametric Scan Statistic for Spatial Data. Spatial statistics, 29, 1-14.
Lionel Cucala and Michaël Genin and Caroline Lanier and Florent Occelli (2017). A Multivariate Gaussian Scan Statistic for Spatial Data. Spatial Statistics, 21, 66-74.
For functional scan statistics:
Zaineb Smida and Lionel Cucala and Ali Gannoun. A Nonparametric Spatial Scan Statistic for Functional Data. Pre-print <https://hal.archives-ouvertes.fr/hal-02908496>.
Camille Frévent and Mohamed-Salem Ahmed and Matthieu Marbac and Michaël Genin. Detecting Spatial Clusters in Functional Data: New Scan Statistic Approaches. Pre-print <arXiv:2011.03482>.
Camille Frévent and Mohamed-Salem Ahmed and Sophie Dabo-Niang and Michaël Genin. Investigating Spatial Scan Statistics for Multivariate Functional Data. Pre-print <arXiv:2103.14401>.
See Also
ResScanOutput
, ResScanOutputUni
, ResScanOutputMulti
, ResScanOutputUniFunct
and ResScanOutputMultiFunct
Examples
# Univariate scan statistics
library(sp)
data("map_sites")
data("multi_data")
uni_data <- multi_data[,1]
coords <- coordinates(map_sites)
res <- SpatialScan(method = c("UG", "UNP"), data = uni_data, sites_coord = coords,
system = "WGS84", mini = 1, maxi = nrow(coords)/2)
# Multivariate scan statistics
library(sp)
data("map_sites")
data("multi_data")
coords <- coordinates(map_sites)
res <- SpatialScan(method = c("MG", "MNP"), data = multi_data, sites_coord = coords,
system = "WGS84", mini = 1, maxi = nrow(coords)/2)
# Univariate functional scan statistics
library(sp)
data("map_sites")
data("funi_data")
coords <- coordinates(map_sites)
res <- SpatialScan(method = c("NPFSS", "PFSS", "DFFSS", "URBFSS"), data = funi_data,
sites_coord = coords, system = "WGS84", mini = 1, maxi = nrow(coords)/2)
# Multivariate functional
library(sp)
data("map_sites")
data("fmulti_data")
coords <- coordinates(map_sites)
res <- SpatialScan(method = c("NPFSS", "MPFSS", "MDFFSS", "MRBFSS"), data = fmulti_data,
sites_coord = coords, system = "WGS84", mini = 1, maxi = nrow(coords)/2)