# Univariate scan statistics
# \donttest{
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)# }
# \dontshow{
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, MC = 9)# }
# Multivariate scan statistics
# \donttest{
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)# }
# \dontshow{
library(sp)
data("map_sites")
data("multi_data")
indices <- c(51:75)
coords <- coordinates(map_sites[indices,])
res <- SpatialScan(method = c("MG", "MNP"), data = multi_data[indices,], sites_coord = coords,
system = "WGS84", mini = 1, maxi = nrow(coords)/2, MC = 9)
# }
# Univariate functional scan statistics
# \donttest{
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)# }
# \dontshow{
library(sp)
data("map_sites")
data("funi_data")
indices <- c(51:75)
coords <- coordinates(map_sites[indices,])
res <- SpatialScan(method = c("NPFSS", "PFSS", "DFFSS", "URBFSS"), data = funi_data[indices,],
sites_coord = coords, system = "WGS84", mini = 1, maxi = 1, MC = 9)
# }
# Multivariate functional
# \donttest{
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)# }
# \dontshow{
library(sp)
data("map_sites")
data("fmulti_data")
indices <- c(51:75)
coords <- coordinates(map_sites[indices,])
res <- SpatialScan(method = c("NPFSS", "MPFSS", "MDFFSS", "MRBFSS"), data = fmulti_data[indices],
sites_coord = coords, system = "WGS84", mini = 1, maxi = 1, MC = 9)
# }
Run the code above in your browser using DataLab