seq_scan_test: Sequential Scan Test

View source: R/seq_scan_test.R

seq_scan_testR Documentation

Sequential Scan Test

Description

Performs a series of sequential scan tests by ubpop. Only minimal information is returned for each test. This is intended for internal use by the smerc package.

Usage

seq_scan_test(
  coords,
  cases,
  pop,
  ex = sum(cases)/sum(pop) * pop,
  nsim = 499,
  alpha = 0.05,
  ubpop_seq = seq(0.01, 0.5, len = 50),
  longlat = FALSE,
  cl = NULL,
  type = "poisson",
  min.cases = 0,
  simdist = "multinomial"
)

Arguments

coords

An n \times 2 matrix of centroid coordinates for the regions in the form (x, y) or (longitude, latitude) is using great circle distance.

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.

nsim

The number of simulations from which to compute the p-value.

alpha

The significance level to determine whether a cluster is signficant. Default is 0.10.

ubpop_seq

A strictly increasing numeric vector with values between min(pop)/sum(pop) and 1. The default is seq(0.01, 0.5, len = 50).

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.

cl

A cluster object created by makeCluster, or an integer to indicate number of child-processes (integer values are ignored on Windows) for parallel evaluations (see Details on performance). It can also be "future" to use a future backend (see Details), NULL (default) refers to sequential evaluation.

type

The type of scan statistic to compute. The default is "poisson". The other choice is "binomial".

min.cases

The minimum number of cases required for a cluster. The default is 2.

simdist

Character string indicating the simulation distribution. The default is "multinomial", which conditions on the total number of cases observed. The other options are "poisson" and "binomial"

Value

Returns a list of length(ubpop_seq). Each element of the list has "pruned" set of results (as a list) for a scan test. Element of the pruned list has the elements tobs, zones, pvalue.

Author(s)

Joshua French

See Also

scan.test


jfrench/smerc documentation built on Oct. 27, 2024, 5:13 p.m.