SpatialEpi (version 1.1)

create.geo.objects: Create geographical objects to be used in bayes.cluster function.

Description

This internal function creates the geographical objects needed to run the Bayesian cluster detection method in bayes.cluster. Specifically it creates all single zones based data objects, where single zones are the zones defined by Kulldorff (1997).

Usage

create.geo.objects(max.prop, pop, centroids, sp.obj, area = NULL)

Arguments

max.prop
maximum proportion of study region's population each single zone can contain
pop
vector of length n of the population of each area
centroids
an n x 2 table of the (x,y)-coordinates of the area centroids. The coordinate system must be grid-based
sp.obj
an object of class SpatialPolygons (See SpatialPolygons-class) representing the study region
area
geographic area of each of the n areas. If not specified, this function will compute them based on sp.obj

Value

  • overlapa list with two elements: 1. presence which lists for each areas all the single zones it is present in and 2. cluster_list for each single zone its component areas
  • cluster.coordsn.zones x 2 matrix of the centering and radial area of each single zone
  • areazvector of the geographic surface area of each single zone

References

Kulldorff, M. (1997) A spatial scan statistic. Communications in Statistics: Theory and Methods, 26, 1481--1496.

See Also

latlong2grid, zones

Examples

Run this code
data(pennLC)
max.prop <- 0.15
pop <- tapply(pennLC$data$population, pennLC$data$county, sum)
centroids <- latlong2grid(pennLC$geo[, 2:3])
map <- pennLC$spatial.polygon
output <- create.geo.objects(max.prop, pop, centroids, map)

## number of single zones
nrow(output$cluster.coords)
length(output$areaz)

Run the code above in your browser using DataCamp Workspace