echelon | R Documentation |
The echelon
function divides the study area into structural entities, called 'echelons', based on neighbor information and draws a dendrogram.
echelon(x, nb, dendrogram = TRUE, name = NULL,
main = NULL, ylab = NULL, yaxes = TRUE, ylim = NULL,
xaxes = FALSE, xdper = c(0, 1), dmai = NULL,
col = 1, lwd = 1, symbols = 4, cex.symbols = 1, col.symbols = 4,
ens = TRUE, adj.ens = 1, cex.ens = 0.8, col.ens = 1,
profiles = FALSE, nb.check = TRUE)
x |
A numeric vector containing data values. |
nb |
Neighbor information data: an object of class |
name |
Region names. if NULL, it is assigned |
dendrogram |
Logical. if TRUE, draws an echelon dendrogram. |
main |
Related to dendrogram drawing. The main title for the dendrogram. |
ylab |
Related to dendrogram drawing. The title for the y-axis. |
yaxes |
Related to dendrogram drawing. Logical. if TRUE, draws the y-axis. |
ylim |
Related to dendrogram drawing. If not specified, the y-axis scale is set to |
xaxes |
Related to dendrogram drawing. Logical. if TRUE, draws the x-axis. |
xdper |
Related to dendrogram drawing. The percentage of the x-axis to display, specified in [0, 1]. |
dmai |
Related to dendrogram drawing. A numeric vector of the form |
col |
Related to dendrogram drawing. The line color of the dendrogram. |
lwd |
Related to dendrogram drawing. The line width of the dendrogram. |
symbols |
Related to dendrogram drawing. An integer specifying a symbol or a single character. If integer, it corresponds to |
cex.symbols |
Related to dendrogram drawing. A magnification factor for the plotting symbols. |
col.symbols |
Related to dendrogram drawing. The color for the plotting symbols. |
ens |
Related to dendrogram drawing. Logical. if TRUE, draw the labels of echelon numbers. |
adj.ens |
Related to dendrogram drawing. Adjusts the position of echelon number labels (see |
cex.ens |
Related to dendrogram drawing. A magnification factor for the echelon number labels. |
col.ens |
Related to dendrogram drawing. The color for the echelon number labels. |
profiles |
Logical. If TRUE, returns the echelon profiles result (see [2] for details). |
nb.check |
Logical. if TRUE, checks for errors in the neighbor information data. |
The echelon
function returns an object of class echelon
, which contains the following components:
Table |
A summary of each echelon. |
Echelons |
The regions that make up each echelon. |
Any NA
values in x
are replaced with the minimum value of x
.
The functions Sf::st_read
and spdep::poly2nb
are helpful for creating the object specified in the nb
argument.
Fumio Ishioka
[1] Myers, W.L., Patil, G.P. and Joly, K. (1997). Echelon approach to areas of concern in synoptic regional monitoring. Environmental and Ecological Statistics, 4, 131–152.
[2] Kurihara, K., Myers, W.L. and Patil, G.P. (2000) Echelon analysis of the relationship between population and land cover patter based on remote sensing data. Community ecology, 1, 103–122.
echepoi
and echebin
for cluster detection based on echelons.
##Echelon analysis for one-dimensional data with 25 regions
#A weights matrix
one.nb <- matrix(0,25,25)
one.nb[1,2] <- 1
for(i in 2:24) one.nb[i,c(i-1,i+1)] <- c(1,1)
one.nb[25,24] <- 1
#25 random values
one.dat <- runif(25) * 10
#Echelon analysis
echelon(x = one.dat, nb = one.nb)
##Echelon analysis for SIDS data for North Carolina
#Mortality rate per 1,000 live births from 1974 to 1984
library(spData)
data("nc.sids")
SIDS.cas <- nc.sids$SID74 + nc.sids$SID79
SIDS.pop <- nc.sids$BIR74 + nc.sids$BIR79
SIDS.rate <- SIDS.cas * 1000 / SIDS.pop
#Echelon analysis
SIDS.echelon <- echelon(x = SIDS.rate, nb = ncCR85.nb, name = row.names(nc.sids),
symbols = 12, cex.symbols = 1.5, ens = FALSE)
text(SIDS.echelon$coord, labels = SIDS.echelon$regions.name,
adj = -0.1, cex = 0.7)
#Echelon Profiles
echelon(x = SIDS.rate, nb = ncCR85.nb, profiles = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.