Learn R Programming

smerc (version 1.1)

prep.scan: Prepare scan results

Description

prep.scan prepares the results of a scan-related test and turns them into a scan object.

Usage

prep.scan(tobs, zones, pvalue, coords, cases, pop, ex, longlat, w = NULL,
  d = NULL, a = NULL, shape_all = NULL, angle_all = NULL)

Arguments

tobs

The observed test statistics for each zone

zones

A list of zones

pvalue

The p-value associated with each test statistic

coords

An \(n \times 2\) matrix of centroid coordinates for the regions.

cases

The number of cases observed in each region.

pop

The population size associated with each region.

ex

The expected number of cases for each region. The default is calculated under the constant risk hypothesis.

longlat

The default is FALSE, which specifies that Euclidean distance should be used.If longlat is TRUE, then the great circle distance is used to calculate the intercentroid distance.

w

A binary spatial adjacency matrix for the regions.

d

A precomputed distance matrix based on coords

Value

A scan object