# elliptic.nn: Nearest neighbors for elliptic scan In smerc: Statistical Methods for Regional Counts

## 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

 1 2 3 4 5 6 7 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 n \times 2 matrix of centroid coordinates for the regions. 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

 1 2 3 4 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)) 

smerc documentation built on Oct. 1, 2021, 5:07 p.m.