echebin {echelon}R Documentation

Echelon spatial scan statistic based on Binomial model

Description

echebin detects spatial clusters using echelon spatial scan statistic based on Binomial model.

Usage

echebin(echelon.obj, cas, ctl, K = length(cas)/2, n.sim = 99,
        cluster.type = "high", cluster.legend.pos = "bottomleft",
        dendrogram = TRUE, cluster.info = FALSE, coo = NULL, ...)

Arguments

echelon.obj

An object of class echelon. See echelon.

cas

A numeric (integer) vector of case counts. NAs are not allowed.

ctl

A numeric (integer) vector for control counts. NAs are not allowed.

K

Maximum cluster size. if K >= 1 (integer), the cluster size is limit to less than or equal to number of regions K. On the other hand, if 0 < K < 1, the cluster size is limit to less than or equal to K * 100% of the total population.

n.sim

Number of Monte Carlo replications used for significance testing of detected clusters. If 0, the significance is not assessed.

cluster.type

A character string specifying the cluster type. If "high", the detected clusters have high rates (hotspot clusters). On the other hand, If "low", the detected clusters have low rates (coldspot cluster).

cluster.legend.pos

A location of the legend on the dendrogram. (See the help for legend)

dendrogram

Logical. if TRUE, draw an echelon dendrogram with detected clusters.

cluster.info

Logical. if TRUE, return the result of echelon scan statistic.

coo

An array of the (x,y)-coordinates of the region centroid to draw a cluster map.

...

Related to dendrogram drawing. (See the help for echelon)

Value

clusters

Each detected cluster.

scanned.regions

A region list of all scanning processes.

simulated.LLR

Monte Carlo samples of the log-likelihood ratio.

Note

echebin requires either cas and ctl.

Population is defined by the sum of cas and ctl.

Typical values of n.sim are 99, 999, 9999, ...

Author(s)

Fumio Ishioka

References

[1] Kulldorff M, Nagarwalla N. (1995). Spatial disease clusters: Detection and inference. Statistics in Medicine, 14, 799–810.

[2] Kulldorff M. (1997). A spatial scan statistic. Communications in Statistics: Theory and Methods, 26, 1481–1496.

See Also

echelon for the echelon analysis.

echepoi for cluster detection based on echelons using Poisson model.

Examples

##Hotspot detection for non-white birth of North Carolina using echelon scan

#Non-white birth from 1974 to 1984 (case data)
library(spData)
data("nc.sids")
nwb <- nc.sids$NWBIR74 + nc.sids$NWBIR79

#White birth from 1974 to 1984 (control data)
wb <- (nc.sids$BIR74 - nc.sids$NWBIR74) + (nc.sids$BIR79 - nc.sids$NWBIR79)

#Hotspot detection based on Binomial model
nwb.echelon <- echelon(x = nwb/wb, nb = ncCR85.nb, name = row.names(nc.sids))
echebin(nwb.echelon, cas = nwb, ctl = wb, K = 20,
  main = "Hgih rate clusters", ens = FALSE)
text(nwb.echelon$coord, labels = nwb.echelon$regions.name,
  adj = -0.1, cex = 0.7)

#Detected clusters and neighbors map
#XY coordinates of each polygon centroid point
NC.coo <- cbind(nc.sids$lon, nc.sids$lat)
echebin(nwb.echelon, cas = nwb, ctl = wb, K = 20,
  coo = NC.coo, dendrogram = FALSE)


##Detected clusters map
#Here is an example using the sf class "sf"
nwb.clusters <- echebin(nwb.echelon, cas = nwb,
   ctl = wb, K = 20, dendrogram = FALSE)
MLC <- nwb.clusters$clusters[[1]]
Secondary <- nwb.clusters$clusters[[2]]
cluster.col <- rep(0,times=length(nwb))
cluster.col[MLC$regionsID] <- 2
cluster.col[Secondary$regionsID] <- 3

library(sf)
nc <- st_read(system.file("shape/nc.shp", package = "sf"))
plot(nc$geometry, col = cluster.col,
main = "Detected high rate clusters")
text(st_coordinates(st_centroid(st_geometry(nc))),
  labels = nc$CRESS_ID, cex =0.75)
legend("bottomleft",
c(paste("1- p-value:", MLC$p),
  paste("2- p-value:", Secondary$p)),
  text.col = c(2,3))


[Package echelon version 0.2.0 Index]