elliptic.nn {smerc} | R Documentation |
Nearest neighbors for elliptic scan
Description
elliptic.nn
computes the nearest neighbors
relationships for elliptic.test
. It will provide
a list of nearest neighbors, and a list of the associated
shape and angle.
Usage
elliptic.nn(
coords,
pop,
ubpop = 0.5,
shape = c(1, 1.5, 2, 3, 4, 5),
nangle = c(1, 4, 6, 9, 12, 15)
)
Arguments
coords |
An |
pop |
The population size associated with each region. |
ubpop |
The upperbound of the proportion of the total population to consider for a cluster. |
shape |
The ratios of the major and minor axes of the desired ellipses. |
nangle |
The number of angles (between 0 and 180) to consider for each shape. |
Value
A list of nested nearest neighbors, the associated shapes and angles for each set of nn, and all of the shapes and angles you get for each zone constructed from the set of nearest neighbors.
Examples
data(nydf)
coords <- with(nydf, cbind(longitude, latitude))
enn <- elliptic.nn(coords, nydf$pop, 0.1,
shape = c(1, 1.5), nangle = c(1, 4)
)